fix: changes for showing error message in case of INTERNAL_SERVER_ERROR in event types (#10305)

* fix: changes for showing error message in case of INTERNAL_SERVER_ERROR

* changes for edge case

---------

Co-authored-by: Leo Giovanetti <hello@leog.me>
pull/10018/head^2
Neel Patel 2023-07-29 18:44:40 +05:30 committed by GitHub
parent 8f9f096723
commit e68ace87e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -205,6 +205,10 @@ const EventTypePage = (props: EventTypeSetupProps) => {
message = `${err.data.code}: ${t(err.message)}`;
}
if (err.data?.code === "INTERNAL_SERVER_ERROR") {
message = t("unexpected_error_try_again");
}
showToast(message ? t(message) : t(err.message), "error");
},
});