From b1f81daaab3b04e8ae0b3e4edd4984aeade8098e Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 25 Oct 2022 00:11:35 -0700 Subject: send pin --- src/lib/utils.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/lib/utils.js') 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); -- cgit v1.2.3