Skip to content
Advertisement

Tag: interceptor

Axios catch not working when used with a customer interceptor

I am using interceptor that refreshes the access token upon a status code of 401 but my catch has stopped working upon any other error codes such as 400 request.js Answer You need to pass a second argument to your callback to new Promise called reject and then reject the promise using that function instead of Promise.reject. I can’t verify

Advertisement