Broken interceptor error response
See original GitHub issueHello, I have upgraded axios
from 0.12
to 0.16.2
and it looks like that interceptors response is quite diffrent:
Interceptor example code:
axios.interceptors.response.use(response => Promise.resolve(response), (error) => {
console.log(error);
return Promise.reject(error);
});
On version 0.12
it returns nice object:
However on version 0.16.2
it seems to return error stack for the request:
Making interceptors in axios quite useless in my project (I am using it to refresh access token for logged user).
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:15
Top Results From Across the Web
Angular: Handle HTTP Errors using Interceptors
An error interceptor is a special type of interceptor which is used for handling errors that arise while making an HTTP request.
Read more >Broken interceptor detected: Config object not supplied in ...
Somewhere in your code you have a interceptor for $httpProvider which doesn't have a proper response error section, something like this :
Read more >Handling HTTP Error Messages `Globally` using Interceptors ...
Handle all HTTP error messages in your whole Angular app using Interceptors and NGX-Toaster. What are Interceptors?
Read more >Error handling - Express.js
Error Handling refers to how Express catches and processes errors that occur both synchronously and asynchronously. Express comes with a default error ......
Read more >Angular Error Interceptor - Satyapriya Mishra
An error interceptor is a special type of interceptor which is used for handling errors that arise while making an HTTP request. The...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Using v0.17.1
Also the same here, error.response is undefined.
Object.keys(error).forEach(key => console.log(key)) returns config, request, response
but error.response returns undefined. So it’s there but undefined.
Seems to be broken for me as well. Only keys are config and request. Can’t get the status code.