We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
axios.post("http://127.0.0.1:8000/api/login", {email: "rahul@xyz.com", languageId: 1, login_attempts: 1, password: "xxxxx"}).then(function (response) { // handle success console.log(response); }) .catch(function (error) { // handle error console.log(error); }) .then(function () { console.log("response"); // always executed });
axios.interceptors.response.use(function (response) { if(response.headers.access_token) { setToken(response.headers.access_token); } return response; }, function (error) { return Promise.reject(error); });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Following code gives 400 error, but error not rejecting successfully to catch. It acts as error is resolved by promise.
Interceptor used
How will I manage to catch http error in catch ???
The text was updated successfully, but these errors were encountered: