fix: configure correct error message for duplicate event type slug (#24928)
* fix/duplicate-event-type-to-existing slug * use existing pattern to to verify the conflict on slug
This commit is contained in:
1 parent
5c9ad93923
commit
ef4be48ea6
3 files changed
+20
-5
No files matched your search
@@ -93,6 +93,13 @@ const DuplicateDialog = () => {
|
||||
if (err instanceof HttpError) {
|
||||
const message = `${err.statusCode}: ${err.message}`;
|
||||
showToast(message, "error");
|
||||
return;
|
||||
}
|
||||
|
||||
if (err.data?.code === "CONFLICT") {
|
||||
const message = t("duplicate_event_slug_conflict");
|
||||
showToast(message, "error");
|
||||
return;
|
||||
}
|
||||
|
||||
if (err.data?.code === "INTERNAL_SERVER_ERROR" || err.data?.code === "BAD_REQUEST") {
|
||||
|
||||
Reference in new issue
Block a user