Skip to content

Commit

Permalink
Adding better error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
hide-on-bush-x committed Sep 2, 2022
1 parent 4d6b251 commit 216828e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/common/helpers/rest-calls/index.ts
Expand Up @@ -115,7 +115,11 @@ export const useMasaQuery = (
method: metadata.method,
mode: 'cors',
body: JSON.stringify(body),
}).then((res) => res.json()),
})
.then((res) => res.json())
.catch((err) => {
throw new Error(err);
}),
{
...settings,
enabled: process.env.REACT_APP_SOULBOUND
Expand Down

0 comments on commit 216828e

Please sign in to comment.