-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
HttpClient is eating useful exception information #84712
Comments
Tagging subscribers to this area: @dotnet/ncl Issue DetailsConsider a scenario like the .NET 6 connection pool issue w.r.t.
and if you used
Part of the reason is that in
In the above example, oce.InnerException is null, and oce itself contains the useful stack trace.
And in this edge case we're throwing away the original exception entirely
|
Consider a scenario like the .NET 6 connection pool issue w.r.t.
ConnectTimeout
, here's the exception you'd see if you usedHttpClient
:and if you used
HttpMessageInvoker
instead:and a similar example in .NET 5:
Part of the reason is that in
HttpClient.HadleFailure
, we're only capturing theInnerException
in some casesruntime/src/libraries/System.Net.Http/src/System/Net/Http/HttpClient.cs
Line 602 in 7526a4c
In the above example,
oce.InnerException
is null, andoce
itself contains the useful stack trace.And in this edge case we're throwing away the original exception entirely
runtime/src/libraries/System.Net.Http/src/System/Net/Http/HttpClient.cs
Line 623 in 7526a4c
The text was updated successfully, but these errors were encountered: