fix: Various errors & 500 error on duplicate url when editing (#9731)
This commit is contained in:
1 parent
2d6eebcd8a
commit
52936f60b4
8 files changed
+34
-16
No files matched your search
@@ -226,7 +226,7 @@ function EventWorkflowsTab(props: Props) {
|
||||
}
|
||||
|
||||
if (err.data?.code === "UNAUTHORIZED") {
|
||||
const message = `${err.data.code}: You are not able to create this workflow`;
|
||||
const message = `${err.data.code}: ${t("error_workflow_unauthorized_create")}`;
|
||||
showToast(message, "error");
|
||||
}
|
||||
},
|
||||
|
||||
@@ -40,7 +40,7 @@ function WorkflowsPage() {
|
||||
}
|
||||
|
||||
if (err.data?.code === "UNAUTHORIZED") {
|
||||
const message = `${err.data.code}: You are not able to create this workflow`;
|
||||
const message = `${err.data.code}: ${t("error_workflow_unauthorized_create")}`;
|
||||
showToast(message, "error");
|
||||
}
|
||||
},
|
||||
|
||||
@@ -127,12 +127,12 @@ export default function CreateEventTypeDialog({
|
||||
}
|
||||
|
||||
if (err.data?.code === "BAD_REQUEST") {
|
||||
const message = `${err.data.code}: URL already exists.`;
|
||||
const message = `${err.data.code}: ${t("error_event_type_url_duplicate")}`;
|
||||
showToast(message, "error");
|
||||
}
|
||||
|
||||
if (err.data?.code === "UNAUTHORIZED") {
|
||||
const message = `${err.data.code}: You are not able to create this event`;
|
||||
const message = `${err.data.code}: ${t("error_event_type_unauthorized_create")}`;
|
||||
showToast(message, "error");
|
||||
}
|
||||
},
|
||||
|
||||
@@ -65,7 +65,7 @@ const DuplicateDialog = () => {
|
||||
}
|
||||
|
||||
if (err.data?.code === "UNAUTHORIZED" || err.data?.code === "FORBIDDEN") {
|
||||
const message = `${err.data.code}: You are not able to create this event`;
|
||||
const message = `${err.data.code}: ${t("error_event_type_unauthorized_create")}`;
|
||||
showToast(message, "error");
|
||||
}
|
||||
},
|
||||
|
||||
@@ -56,7 +56,7 @@ export function NewScheduleButton({
|
||||
}
|
||||
|
||||
if (err.data?.code === "UNAUTHORIZED") {
|
||||
const message = `${err.data.code}: You are not able to create this event`;
|
||||
const message = `${err.data.code}: ${t("error_schedule_unauthorized_create")}`;
|
||||
showToast(message, "error");
|
||||
}
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user