Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AsyncHTTPBuilder correct way of catching exceptions / handling 4xx or 5xx responses #83

Open
ppazos opened this issue Oct 12, 2017 · 0 comments

Comments

@ppazos
Copy link

ppazos commented Oct 12, 2017

I'm testing AsyncHTTPBuilder doing POST of requests with XML body.

When the server responds with 400, I get an exception on the client side, but instead of getting groovyx.net.http.HttpResponseException, I'm getting java.util.concurrent.ExecutionException (this wraps the HttpResponseException).

  1. Should I except all exceptions from the connection to be wrapped into ExecutionException?
  2. Is there a way to specify failure handler for AsyncHTTPBuilder?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant