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

Add some documentation

parent 00be017d
No related branches found
No related tags found
No related merge requests found
......@@ -3,9 +3,11 @@ import {i18n} from "./i18n";
export const xhrError = (jqXHR, textStatus, errorThrown) => {
if (textStatus !== "abort") {
// try to show hydra error text
let body = jqXHR.responseJSON !== undefined && jqXHR.responseJSON["hydra:description"] !== undefined ?
jqXHR.responseJSON["hydra:description"] : textStatus;
// if the server is not reachable at all
if (jqXHR.status === 0) {
body = 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