From 6a6e200ef947b92576351e39fc30b6653a576d70 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Mon, 7 Oct 2019 21:04:58 -0400 Subject: Update rejections to use Error --- ext/fg/js/frontend-api-receiver.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ext/fg/js/frontend-api-receiver.js') 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)}); }); } -- cgit v1.2.3