aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-10-25 00:11:35 -0700
committerAdam Soltys <[email protected]>2022-10-25 00:11:35 -0700
commitb1f81daaab3b04e8ae0b3e4edd4984aeade8098e (patch)
tree97369f2a128b778a0344b7a6e7458de47eab9769 /src/lib/utils.js
parent0e17224e71296cf6a0336c5a2e7340a3b63cd2dc (diff)
downloadcoinos-ui-b1f81daaab3b04e8ae0b3e4edd4984aeade8098e.tar.gz
coinos-ui-b1f81daaab3b04e8ae0b3e4edd4984aeade8098e.zip
send pin
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);