Answer the question
In order to leave comments, you need to log in
How to redirect the user to the authorization page in the error interceptor?
There is an error handler like this:
axios.interceptors.response.use(function (response) {
return response;
}, function (error) {
if (error.response.status === 400) {
что здесь написать?
}
return Promise.reject(error.response.data)
});
Answer the question
In order to leave comments, you need to log in
In fact, if you do not need to save the store, then you can simply window.location.href = '/'
If not, then I would like to hear arguments against)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question