mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-11 23:17:48 +00:00
Don't catch other 4xx errors
This commit is contained in:
@@ -20,11 +20,12 @@ document.addEventListener("turbo:submit-end", (event) => {
|
||||
});
|
||||
|
||||
function showError(status) {
|
||||
// Note that other 4xx errors will be handled differently.
|
||||
if(status == 401) {
|
||||
alert(I18n.t("errors.unauthorized.message"));
|
||||
} else if(status === undefined) {
|
||||
alert(I18n.t("errors.network_error.message"));
|
||||
} else {
|
||||
} else if (status >= 500) {
|
||||
alert(I18n.t("errors.general_error.message"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user