gwtquery icon indicating copy to clipboard operation
gwtquery copied to clipboard

Ajax request onError missing response argument

Open heyarny opened this issue 10 years ago • 3 comments

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.

heyarny avatar May 12 '14 11:05 heyarny

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.

pharacyde avatar Oct 13 '14 14:10 pharacyde

Inside your Function instance, call:

Response response = arguments(3);

jDramaix avatar Oct 27 '14 08:10 jDramaix

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.

jDramaix avatar Oct 27 '14 08:10 jDramaix