-
Notifications
You must be signed in to change notification settings - Fork 338
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
Errors inside process_response_* callbacks are swallowed. #168
Comments
Looking deeper, I found #141, it looks like the intention was to catch any Hackney errors. This is a laudable aim, but the current solution catches much more than just the Hackney errors. I'll work on a patch which still catches the hackney errors but also bubbles up any processing exceptions. |
25 minutes later, #169 appeared. |
As soon as I release a new version we can close this issue? 👍 (Hopefully today) |
Brilliant. Thanks! On Mon, 29 Aug 2016 at 8:32 AM Eduardo Gurgel <
a, pre, code, a:link, body { word-wrap: break-word !important; } As soon as I release a new version we can close this issue? 👍 (Hopefully today) — You are receiving this because you authored the thread. Reply to this email directly, |
In
HTTPoison.Base.request
, the error handling around Hackney is useful for catching any errors inside the request/response cycle. However, this error handling also means that any errors which occur inside the `process_response_* callbacks get swallowed. That can make it hard to debug anything happening inside that method.Because it's a private method, it can be hard to test in isolation.
What do you think about doing something to improved the bubbling of errors up from here?
(The offending catch is here: https://github.com/edgurgel/httpoison/blob/master/lib/httpoison/base.ex#L414)
The text was updated successfully, but these errors were encountered: