Closed cernadasjuan closed 2 years ago
Hi! Sometimes the axios error comes with config null or undefined, and the errorLogger crashes with this exception
ERROR: Cannot destructure property `method` of 'undefined' or 'null'.
As a workaround I resolved it by adding this validation in the axios interceptor
axiosInstance.interceptors.response.use(responseLogger, (error) => { if (error.config && error.response) { return errorLogger(error) } return Promise.reject(error) })
But I think the best solution is to add a validation in the errorLogger to prevent this type of crashes (if I catch some free time I can solve this and create the PR).
errorLogger
Thanks!
Note: I think is related with this issue #50
Thank you for feedback. I will consider 🙇
Hi! Sometimes the axios error comes with config null or undefined, and the errorLogger crashes with this exception
As a workaround I resolved it by adding this validation in the axios interceptor
But I think the best solution is to add a validation in the
errorLogger
to prevent this type of crashes (if I catch some free time I can solve this and create the PR).Thanks!
Note: I think is related with this issue #50