I am trying to use onError helper as mentioned in documentation (https://axios.nuxtjs.org/helpers) But it is not returning error code. It is simply just returning string message "Network Error"
Should return error object with status code and status message.
Only returning generic error message.
I get the same issue.
Same issue here.
So I did some quick googling and realized Axios returns 'Network error' when it didn't get a response from the web service it made the request to. In my case it was related to a CORS issue on my API. After solving that issue the onError helper works fine.
See also: https://github.com/axios/axios/issues/383
Summarized; this is not a bug, just the way Axios handles errors without responses.
@pi0 can closed?