model
.withParams(credentials)
.post()
.then((success) => {
/* Set data. */
commit('setUser', success.data.data.user);
})
.catch((error) => {
if (error.data.data.message) {
commit('setErrors', [error.data.data.message]);
}
});
Instead, the error object:
Error: Request failed with status code 422
at createError (D:\Projects\Desionlab\Alex south\fastPanel\terminal\Source\node_modules\axios\lib\core\createError.js:16)
at settle (D:\Projects\Desionlab\Alex south\fastPanel\terminal\Source\node_modules\axios\lib\core\settle.js:18)
at XMLHttpRequest.handleLoad (D:\Projects\Desionlab\Alex south\fastPanel\terminal\Source\node_modules\axios\lib\adapters\xhr.js:77)
How to get a response from the server in "catch"?
Instead, the error object:
Thanks in advance.