aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r--ext/bg/js/backend.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 3c5ad885..fb77b71e 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -75,7 +75,7 @@ class Backend {
const promise = handler(params, sender);
promise
.then(result => callback({result}))
- .catch(error => callback({error: typeof error.toString === 'function' ? error.toString() : error}));
+ .catch(error => callback(errorToJson(error)));
}
return true;