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

Errors inside process_response_* callbacks are swallowed. #168

Closed
mootpointer opened this issue Aug 26, 2016 · 5 comments
Closed

Errors inside process_response_* callbacks are swallowed. #168

mootpointer opened this issue Aug 26, 2016 · 5 comments

Comments

@mootpointer
Copy link
Contributor

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)

@mootpointer
Copy link
Contributor Author

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.

@mootpointer
Copy link
Contributor Author

25 minutes later, #169 appeared.

@edgurgel
Copy link
Owner

As soon as I release a new version we can close this issue? 👍 (Hopefully today)

@mootpointer
Copy link
Contributor Author

Brilliant.

Thanks!

On Mon, 29 Aug 2016 at 8:32 AM Eduardo Gurgel

<
mailto:Eduardo Gurgel [email protected]

wrote:

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,
#168 (comment)
, or
https://github.com/notifications/unsubscribe-auth/AAHv96BBY0MNYfrgi-t-qVL9ir6-_eymks5qkgxogaJpZM4Jt_W8
.

@edgurgel
Copy link
Owner

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

2 participants