_response: function( e ){
console.log("Response received, OK!")
console.log( e.detail );
},
_error: function( e ){
console.log("Response received, ERROR!")
console.log( e );
debugger;
}
And making sure that the server returns error 422...
Expected outcome
In _error, I expect e.detail.request.response to be set as the data returned by the object.
Actual outcome
e.detail.request.response is null; to get the response, I have to ask `e.detail.request.xhr.response which feels a little hacky, since the request is in fact done and e.detail.request.response should be set.
Sorry, no live demo as it requires a server returning an error...
Description
Having a form like this:
And then defining the handlers:
And making sure that the server returns error 422...
Expected outcome
In _error, I expect
e.detail.request.response
to be set as the data returned by the object.Actual outcome
e.detail.request.response
isnull
; to get the response, I have to ask`e.detail.request.xhr.response
which feels a little hacky, since the request is in fact done ande.detail.request.response
should be set.Sorry, no live demo as it requires a server returning an error...