We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents eb6224f + 26be1d4 commit 2c1650bCopy full SHA for 2c1650b
utils/api/base.js
@@ -11,7 +11,10 @@ export const fetcher = (url, token) => {
11
.then(res => res.data)
12
.catch(error => {
13
Sentry.captureException(error)
14
- throw error
+ // the `signIn` function from "next-auth/react" uses `fetcher` and returns a 404 error response. throwing that error causes an
15
+ // `OAUTH_CALLBACK_HANDLER_ERROR`, which prevents users from signing in. `signIn` doesn't pass a url to `fetcher`. the check below
16
+ // ensures that other errors still get thrown
17
+ if (error.config.url !== null) throw error
18
})
19
}
20
0 commit comments