aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/frontend-api-receiver.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg/js/frontend-api-receiver.js')
-rw-r--r--ext/fg/js/frontend-api-receiver.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/fg/js/frontend-api-receiver.js b/ext/fg/js/frontend-api-receiver.js
index 687e5c3c..fbfb3ab0 100644
--- a/ext/fg/js/frontend-api-receiver.js
+++ b/ext/fg/js/frontend-api-receiver.js
@@ -46,9 +46,8 @@ class FrontendApiReceiver {
result => {
this.sendResult(port, id, senderId, {result});
},
- e => {
- const error = typeof e.toString === 'function' ? e.toString() : e;
- this.sendResult(port, id, senderId, {error});
+ error => {
+ this.sendResult(port, id, senderId, {error: errorToJson(error)});
});
}