Handle when the response is a non-axios error.
arthurfiorette opened this issue · comments
If you have used axios-cache-interceptor before, you probably have seen this error:
TypeError: Cannot read properties of undefined (reading 'id')
This happens because we blindly trust that the rejected response interceptor will be called with a axios error object, which not always is right.
We should do a try catch in the first line to just propagate non-axios errors.
Hi @arthurfiorette I would like to work on this issue , can you please tell me how to replicate this issue , I have been working with React and Javascript and we use axios for our api calls, I do understand the problem and I think I can contribute on this
@arthurfiorette I have created a pull request for the same issue let me know the feedback
Implemented by 929054e