Skip to content
Snippets Groups Projects
Commit c3c1b18b authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire: Committed by Reiter, Christoph
Browse files

Fix handleFetchError error message for TypeError errors with message

parent 33436552
No related branches found
No related tags found
No related merge requests found
......@@ -43,9 +43,9 @@ export const handleFetchError = async (error, summary = "") => {
body = error.statusText !== undefined ? error.statusText : error;
});
} catch (e) {
// we get a TypeError if the connection to the server was refused
// a TypeError means the connection to the server was refused most of the times
if (error.name === "TypeError") {
body = i18n.t('error.connection-to-server-refused');
body = error.message !== "" ? error.message : i18n.t('error.connection-to-server-refused');
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment