-
Notifications
You must be signed in to change notification settings - Fork 192
http-client-tls: Also catch TLSError exceptions #273
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
Conversation
|
Wow, still getting: even with this patch. |
|
Just re-checked my test setup and I am very definitely getting this exception even with this patch. However, this patch is useful and should probably be applied regardless. |
|
I'm definitely getting exceptions related to the PR. What needs to be done to get it merged? @erikd I agree it should be merged either way. Do you have a URL which reproduces the |
|
@creichert The only way I was able to reproduce this was by hammering an Amazon s3 bucket (100+ threads downloading parts of a 64+ gigabyte file) until the AWS rate limiter kicked in an started killing connections. Unfortunately this means that there is nothing as simple as a URL that reproduces the error I was chasing. I also tried writing a simple warp-tls client to reproduce the AWS rate limiting behavior but that yielded nothing. I still think using exceptions for error handling is a mistake. |
|
@erikd thanks! too bad. I do think that even if http-client wasn't using exceptions (and using something like This may not help much, but here is a way to repro a
Edit To clarify, you have: So if a new one is added, it may be difficult to remember to check that, even if cabal version of the lib is incremented properly. |
|
I'm not blaming http-client for using exceptions, I am blaming the underlying libraries. I think that if the underlying libraries hadn't used exceptions, then http-client wouldn't have had to handle them. |
|
At work we have a large code base that always tries to catch exceptions as close as possible to their source and turn them into |
|
Good call @creichert, and thanks @erikd. Released to Hackage. |
|
I know this is not satisfactory, but see why Error_Protocol is thrown by tls instead of being wrapped inside HandshakeFailed, and will make a PR. This for a different reason than haskell-tls/hs-tls#220. Exceptions occuring at a renegotiation handshake are simply not wrapped. @creichert Your example has been very helpful, but must be using tls-1.3.9 or even earlier. |
No description provided.