update superadmin error
This commit is contained in:
parent
38a877fa8d
commit
8577b5bd93
@ -391,10 +391,22 @@ export class Home extends LiteElement {
|
|||||||
});
|
});
|
||||||
this.isAddingOrg = false;
|
this.isAddingOrg = false;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
let message = msg("Sorry, couldn't create organization at this time.");
|
||||||
|
|
||||||
|
if (isApiError(e)) {
|
||||||
|
if (e.details === "duplicate_org_name") {
|
||||||
|
message = msg("This org name is already taken, try another one.");
|
||||||
|
} else if (e.details === "duplicate_org_slug") {
|
||||||
|
message = msg("This org URL is already taken, try another one.");
|
||||||
|
} else if (e.details === "invalid_slug") {
|
||||||
|
message = msg(
|
||||||
|
"This org URL is invalid. Please use alphanumeric characters and dashes (-) only.",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.notify({
|
this.notify({
|
||||||
message: isApiError(e)
|
message,
|
||||||
? e.message
|
|
||||||
: msg("Sorry, couldn't create organization at this time."),
|
|
||||||
variant: "danger",
|
variant: "danger",
|
||||||
icon: "exclamation-octagon",
|
icon: "exclamation-octagon",
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user