From 8616d79aad78dad63b77b53c7bf9d509f76fc85d Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Sun, 15 Sep 2019 14:31:50 +0200 Subject: [PATCH] make fetch errors more informative by including method and url --- src/matrix/hs-api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matrix/hs-api.js b/src/matrix/hs-api.js index 2e9bedbe..903b2849 100644 --- a/src/matrix/hs-api.js +++ b/src/matrix/hs-api.js @@ -92,7 +92,7 @@ export default class HomeServerApi { // // One could check navigator.onLine to rule out the first // but the 2 later ones are indistinguishable from javascript. - throw new NetworkError(err.message); + throw new NetworkError(`${method} ${url}: ${err.message}`); } throw err; });