update superadmin error
This commit is contained in:
parent
38a877fa8d
commit
8577b5bd93
@ -391,10 +391,22 @@ export class Home extends LiteElement {
|
||||
});
|
||||
this.isAddingOrg = false;
|
||||
} 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({
|
||||
message: isApiError(e)
|
||||
? e.message
|
||||
: msg("Sorry, couldn't create organization at this time."),
|
||||
message,
|
||||
variant: "danger",
|
||||
icon: "exclamation-octagon",
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user