From 48a47cb6398199e3ce5fb506f3b703c305c06e2c Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Sat, 16 Feb 2019 00:25:38 +0100 Subject: [PATCH] expose native error for now as server not reachable seems to be reported as a TypeError with message "fetch failed" or something in chrome, let's see if we can find something in common between browsers to wrap it into something more sensible --- 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 75fe4261..2eb2a1f1 100644 --- a/src/matrix/hs-api.js +++ b/src/matrix/hs-api.js @@ -64,7 +64,7 @@ export default class HomeServerApi { }, err => { switch (err.name) { case "AbortError": throw new RequestAbortError(); - default: throw new Error(`Unrecognized DOMException: ${err.name}`); + default: throw err; //new Error(`Unrecognized DOMException: ${err.name}`); } }); return new RequestWrapper(promise, controller);