Skip to content

Commit 6113560

Browse files
committed
properly throw errors from fetcher
although we were catching the error in `#fetcher`, we weren't returning it as an error. it was being returned to the caller as the `data` value. this means none of our `isError` checks for GET requests were working properly. with this commit, we're throwing the error so that we are handling it on the view correctly.
1 parent 9c7f21f commit 6113560

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

utils/api/base.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export const fetcher = (url, token) => {
1111
.then(res => res.data)
1212
.catch(error => {
1313
Sentry.captureException(error)
14+
throw error
1415
})
1516
}
1617

0 commit comments

Comments
 (0)