aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/utils.js')
-rw-r--r--src/lib/utils.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/utils.js b/src/lib/utils.js
index d8a7b60c..7eeab648 100644
--- a/src/lib/utils.js
+++ b/src/lib/utils.js
@@ -42,6 +42,8 @@ export const post = (url, body, headers) => {
throw new Error(body);
}
+
+ if (body.error) throw body.error;
if (body instanceof Error) throw body;
if (body.name === 'Error') throw new Error(body.message);