From 7a6e2925bdf94cf93c858323587d24e156d8b7ac Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Fri, 22 Sep 2017 19:57:00 -0700 Subject: improved error reporting --- ext/bg/js/backend.js | 2 +- ext/bg/js/search.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/bg/js') diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js index 7d68ed84..01340419 100644 --- a/ext/bg/js/backend.js +++ b/ext/bg/js/backend.js @@ -71,7 +71,7 @@ class Backend { return promise.then(result => { callback({result}); }).catch(error => { - callback({error}); + callback({error: error.toString ? error.toString() : error}); }); }; diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js index 54cda8ec..40bf2019 100644 --- a/ext/bg/js/search.js +++ b/ext/bg/js/search.js @@ -29,7 +29,7 @@ class DisplaySearch extends Display { } onError(error) { - window.alert(`Error: ${error}`); + window.alert(`Error: ${error.toString ? error.toString() : error}`); } onSearchClear() { -- cgit v1.2.3