-
Notifications
You must be signed in to change notification settings - Fork 985
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
ConnectionFailed vs TimeoutError with Patron #682
Comments
Hi @stayhero and thanks for pointing this out. |
@iMacTia Ok, thanks. After digging a bit deeper, it seems the error message comes directly from curl (https://github.com/curl/curl/blob/e60fe20fdf94e829ba5fce33f7a9d6c281149f7d/lib/multi.c#L1375) and they never changed it. It's rather that curl raises different error messages when doing a simple http connect vs. a "multi-connect" on timeout. Hence to me it seems you could basically trust curl to not change their message in the future. If it's not causing to much headaches to you I'd create a pull-request simply checking for both error messages? Or do you think about deprecating Patron support in near future and its generally better to use Typhoeus for the average Faraday user who wants a curl-backend? 😬 |
@stayhero Typhoeus is actually deprecated already 😅 so Patron is the only curl-backend alternative at this point. |
Fixed in #687 |
Hi,
I recently discovered that we receive a TimeoutError when Patron is not able to connect to the host and the open_timeout limit is reached.
From reading the source, we should receive a ConnectionFailed error?
I believe Patron returns another error message ("Connection timed out after ..."). I created a branch with a failing test. Unfortunately most other adapters also seem to return TimeoutError in such cases. Therefore, before I create a pull request, I'd like to know the desired behavior?
Forked branch with fixed error for Patron but new errors for other adapters:
master...stayhero:fix-patron-connection-timeout
The text was updated successfully, but these errors were encountered: