I am using RoboSpice to access some rest services I developed using resteasy. I'm returning a JSON object when everything is ok and in the case of an exception I'm returning an http error code and a JSON object describing the nature of the exception. I'm able to get the JSON object when everything is working fine but I'm only able to get the exception and the http error code, but not the JSON I just returned in case of an exception. I have tried doing the same in iOS and I can get everything in every case, anyone knows how to do this using RoboSpice?. By the way I'm using Jackson and Spring. Thanks!
Take a look at the method explained in this thread for intercepting the http status for a failing request.
Please note that the HttpClientErrorException
has a getResponseBodyAsString()
method that should help you reading the JSON response.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With