aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-09-22 19:57:00 -0700
committerAlex Yatskov <alex@foosoft.net>2017-09-22 19:57:00 -0700
commit7a6e2925bdf94cf93c858323587d24e156d8b7ac (patch)
treefcae21183e1f9b7408bde9e751f59002fbc24fb4 /ext/bg/js
parent8ba8397170c99e1d4416277e26d91ebb4b8cfed1 (diff)
improved error reporting
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/backend.js2
-rw-r--r--ext/bg/js/search.js2
2 files changed, 2 insertions, 2 deletions
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() {