Skip to content

How to catch 401 error from Axios? #752

Answered by RaddishIoW
RaddishIoW asked this question in Q&A
Discussion options

You must be logged in to vote

OK, I discovered that my error boundary was catching the error object from SWR (which was the cached error) and stopping any future call to my fetcher, meaning my error handler was not then called on the next error.
I've stopped my error boundary from handling the cached error from SWR and it's now working as expected.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by RaddishIoW
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant