Mentions légales du service

Skip to content
Snippets Groups Projects
Verified Commit 024ee06b authored by Philippe Virouleau's avatar Philippe Virouleau
Browse files

wip

parent 2c88eb77
No related branches found
No related tags found
No related merge requests found
Pipeline #1074342 passed
......@@ -2,9 +2,9 @@ export function defaultFetch(url: string, options = {}) {
return fetch(url, options).then(r => {
if (!r.ok) {
const error = new Error(
`An error ${r.status} occurred while fetching data`
`An error ${r.status} occurred while fetching data`,
{ cause: r.statusText }
);
error.cause = r.statusText;
throw error;
}
return r.json();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment