fix: Show proper error in case the team can't be published because requestedSlug isn't set (#14283)
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
This commit is contained in:
co-authored by
Udit Takkar
parent
6283535d6a
commit
2cbf9e1ac8
@@ -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");
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -45,8 +45,7 @@ function AdminOrgTable() {
|
||||
});
|
||||
},
|
||||
onError: (err) => {
|
||||
console.error(err.message);
|
||||
showToast(t("org_error_processing"), "error");
|
||||
showToast(err.message, "error");
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user