Errors added after axios request 'auto-clearing'.
See original GitHub issueVersions:
- VueJs: 2.5.7
- Vee-Validate: 2.1.0-beta.7
Hey everyone!
Im trying to set laravel errors from an axios request to my v validate error bag, apparently the error it’s added correctly but it’s auto cleared immediately.
My code its on a compiled webpack file, for debugging I tried to move this to html script tag and add the error manually from console, this seems to work, so don’t really know what’s happening with that auto clearing after the axios request.
What I’m missing? I have a little gif with the “auto-clearing” (email field) where you can see how it’s set for a moment and then gone

And this is the chunk of code from the axios request, it’s a very simple request so I don’t really have a clue of what is happening.
.catch(error => {
let requestErrors = error.response.data;
let errorFields = Object.keys(requestErrors.errors);
errorFields.map(field => {
let errorString = requestErrors.errors[field].join(', ');
this.errors.add({field: field, msg: errorString});
});
});
Finally, amazing work, keep it good ❤️
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Axios handling errors - Stack Overflow
To do that you can create a new promise resolve it when axios request is successful and never reject it in case of...
Read more >Handling Errors | Axios Docs
request ) { // The request was made but no response was received // `error.request` is an instance of XMLHttpRequest in the browser...
Read more >How to handle errors with Axios request - Educative.io
Overview. We can add the catch function to the axios request to handle the error response for the sent request. The catch function...
Read more >How to handle API errors in your web app using axios
Whenever you're making a backend API call with axios, you have to ... Errors" and that dropped down to <2% after adding in...
Read more >DayZ Update 1 19 155390 Patch Notes The Nerd Stash
DayZ 1 19 155390 Update Patch Notes DayZ 1.19.155390 Update Game Added M1025 ... launcher Cooking sounds would persist on the spot even...
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

I will need to take a look at your template, can you replicate a version at codesandbox with a mocked API?
Does the latest stable 2.0.9 produce the expected result? or is it broken since then?
Glad to hear, we can close this for now.