make fetch errors more informative by including method and url

This commit is contained in:
Bruno Windels 2019-09-15 14:31:50 +02:00
parent c875070ac5
commit 8616d79aad

View file

@ -92,7 +92,7 @@ export default class HomeServerApi {
// //
// One could check navigator.onLine to rule out the first // One could check navigator.onLine to rule out the first
// but the 2 later ones are indistinguishable from javascript. // but the 2 later ones are indistinguishable from javascript.
throw new NetworkError(err.message); throw new NetworkError(`${method} ${url}: ${err.message}`);
} }
throw err; throw err;
}); });