-
Notifications
You must be signed in to change notification settings - Fork 194
Open
Description
I have a concern about this piece of code:
axios[requestType](url, this.data())
.then(response => {
this.onSuccess(response.data);
resolve(response.data);
})
.catch(error => {
this.onFail(error.response.data);
reject(error.response.data);
});Shouldn't you check if error.response.status is 422 before you record errors?
If the server returns eg. 403 or 500, the Errors::errors would contain the whole HTML response which might cause some fatal errors.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels