From: David Shulman Date: Tue, 19 Feb 2019 22:33:43 +0000 (-0800) Subject: Improve HTTP2 connection diagnostics in SocketsHttpHandler (dotnet/corefx#35423) X-Git-Tag: submit/tizen/20210909.063632~11031^2~2408 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ad957976ed4751adeececd94609756c23ee6ce75;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Improve HTTP2 connection diagnostics in SocketsHttpHandler (dotnet/corefx#35423) Modified the top-level exception being returned (HttpRequestException) to always include the inner exception. Contributes to dotnet/corefx#35422 Commit migrated from https://github.com/dotnet/corefx/commit/fcf46bea903c78accd9586fa2fb355ade70c485e --- diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs index d2bd8ea..4a5244b 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs @@ -1238,18 +1238,18 @@ namespace System.Net.Http { http2Stream?.Dispose(); - if (e is IOException ioe) + if (e is IOException) { - throw new HttpRequestException(SR.net_http_client_execution_error, ioe); + throw new HttpRequestException(SR.net_http_client_execution_error, e); } else if (e is ObjectDisposedException) { - throw new HttpRequestException(SR.net_http_client_execution_error); + throw new HttpRequestException(SR.net_http_client_execution_error, e); } else if (e is Http2ProtocolException) { // ISSUE 31315: Determine if/how to expose HTTP2 error codes - throw new HttpRequestException(SR.net_http_client_execution_error); + throw new HttpRequestException(SR.net_http_client_execution_error, e); } else {