aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/frontend-api-receiver.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-10-07 21:04:58 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-10-08 21:44:25 -0400
commit6a6e200ef947b92576351e39fc30b6653a576d70 (patch)
treeebe6bce781d597eb04dbea85395d9795409897d0 /ext/fg/js/frontend-api-receiver.js
parent88de4271843197d37243a9ac360236f9dfb414e1 (diff)
Update rejections to use Error
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)});
});
}