gwtquery
gwtquery copied to clipboard
Ajax request onError missing response argument
I'd like to access the response object within the failure callback. In case I want to create my own Exception out of the statusCode and statusText there are no arguments or ways to get the response object.
The Exception created by Ajax does not meet my requirements as it creates a hardcoded predefined message with the whole html/text response.
we are having the same issue. We are interested in the JSON payload from our REST Service, as it contains the description why the request failed.
Inside your Function instance, call:
Response response = arguments(3);
Sorry I didn't see that your question was about the failure callback.
Indeed it seems that we don't propagate the request on error.