[https://github.com/totski90/laravel-nuxt-front-end and the backend https://github.com/totski90/laravel-nux-back-end]
When form validation failed, it will be redirected to the default error "Request failed with status code 422" instead of the server side validation returned.
The expected returned should be the validation coming from the server which I handled on the form rendering if validation fails.
It happened that the returned error was the javascript default error
Use try/catch around your axios calls and handle the error properly.
e.g. in https://github.com/totski90/laravel-nuxt-front-end/blob/master/pages/register.vue#L54
PS: This is not a problem related to Nuxt :relaxed:
can not use try catch with nuxt-auth?
await this.$auth.loginWith("local",{
data: this.form
});
What to do in this case?
Most helpful comment
can not use try catch with nuxt-auth?
What to do in this case?