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>
This commit is contained in:
Neel Patel
2023-07-29 10:14:40 -03:00
committed by GitHub
co-authored by Leo Giovanetti
parent 8f9f096723
commit e68ace87e2
@@ -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");
},
});