Skip to content

Scheduling infrastructure for absolutely everyone.

fix: Show proper error in case the team can't be published because requestedSlug isn't set (#14283)

Hariom Balhara2cbf9e1ac864
diff --git a/packages/features/ee/organizations/pages/settings/admin/AdminOrgEditPage.tsx b/packages/features/ee/organizations/pages/settings/admin/AdminOrgEditPage.tsx
index 04a10feeb1c..f5c8f164a30 100644
--- a/packages/features/ee/organizations/pages/settings/admin/AdminOrgEditPage.tsx
+++ b/packages/features/ee/organizations/pages/settings/admin/AdminOrgEditPage.tsx
@@ -68,8 +68,7 @@ const OrgForm = ({
router.replace(`/settings/admin/organizations`);
},
onError: (err) => {
- console.error(err.message);
- showToast(t("org_error_processing"), "error");
+ showToast(err.message, "error");
},
});
diff --git a/packages/features/ee/organizations/pages/settings/admin/AdminOrgPage.tsx b/packages/features/ee/organizations/pages/settings/admin/AdminOrgPage.tsx
index dbec98acc5b..eaf6373169b 100644
--- a/packages/features/ee/organizations/pages/settings/admin/AdminOrgPage.tsx
+++ b/packages/features/ee/organizations/pages/settings/admin/AdminOrgPage.tsx
@@ -45,8 +45,7 @@ function AdminOrgTable() {
});
},
onError: (err) => {
- console.error(err.message);
- showToast(t("org_error_processing"), "error");
+ showToast(err.message, "error");
},
});
diff --git a/packages/trpc/server/routers/viewer/organizations/adminUpdate.handler.ts b/packages/trpc/server/routers/viewer/organizations/adminUpdate.handler.ts
index 6d96ad05a6a..5410c8a3bd6 100644
--- a/packages/trpc/server/routers/viewer/organizations/adminUpdate.handler.ts
+++ b/packages/trpc/server/routers/viewer/organizations/adminUpdate.handler.ts
@@ -108,7 +108,7 @@ async function throwIfSlugConflicts({ id, slug }: { id: number; slug: string })
// If foundOrg isn't same as the org being edited
if (foundOrg.id !== id) {
throw new HttpError({
- message: "Organization with same slug already exists",
+ message: "Organization or a Team with same slug already exists",
statusCode: 400,
});
}