42 references to HttpRequestException
System.Net.Http (42)
System\Net\Http\HttpContent.cs (2)
696
return new
HttpRequestException
(error, SR.net_http_content_stream_copy_error, e);
768
return new
HttpRequestException
(HttpRequestError.ConfigurationLimitExceeded, SR.Format(CultureInfo.InvariantCulture, SR.net_http_content_buffersize_exceeded, maxBufferSize));
System\Net\Http\HttpRequestException.cs (1)
67
:
this
(httpRequestError, message, inner)
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.NtAuth.cs (1)
214
throw new
HttpRequestException
(HttpRequestError.UserAuthenticationError, SR.Format(SR.net_http_authvalidationfailure, statusCode), statusCode: HttpStatusCode.Unauthorized);
System\Net\Http\SocketsHttpHandler\ConnectHelper.cs (1)
92
HttpRequestException ex = new
HttpRequestException
(HttpRequestError.SecureConnectionError, SR.net_http_ssl_connection_failed, e);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (5)
470
HttpRequestException exception =
new
(HttpRequestError.ExtendedConnectNotSupported, SR.net_unsupported_extended_connect);
537
throw new
HttpRequestException
(HttpRequestError.VersionNegotiationError, SR.Format(SR.net_http_requested_version_server_refused, request.Version, request.VersionPolicy), e);
797
throw new
HttpRequestException
(HttpRequestError.ProxyTunnelError, SR.Format(SR.net_http_proxy_tunnel_returned_failure_status_code, _proxyUri, (int)tunnelResponse.StatusCode), statusCode: tunnelResponse.StatusCode);
824
throw new
HttpRequestException
(HttpRequestError.ProxyTunnelError, SR.net_http_proxy_tunnel_error, e);
871
HttpRequestException ex =
new
(HttpRequestError.VersionNegotiationError, SR.Format(SR.net_http_requested_version_cannot_establish, request.Version, request.VersionPolicy, desiredVersion), inner);
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (2)
2054
throw new
HttpRequestException
(e.HttpRequestError, e.Message, e);
2058
throw new
HttpRequestException
(HttpRequestError.Unknown, SR.net_http_client_execution_error, e);
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (8)
560
throw new
HttpRequestException
(HttpRequestError.InvalidResponse, SR.net_http_invalid_response);
583
throw new
HttpRequestException
(HttpRequestError.InvalidResponse, SR.net_http_invalid_response);
609
throw new
HttpRequestException
(HttpRequestError.ConfigurationLimitExceeded, SR.Format(SR.net_http_response_headers_exceeded_length, _connection._pool.Settings.MaxResponseHeadersByteLength));
631
throw new
HttpRequestException
(HttpRequestError.InvalidResponse, SR.net_http_invalid_response_multiple_status_codes);
638
throw new
HttpRequestException
(HttpRequestError.InvalidResponse, SR.net_http_invalid_response_pseudo_header_in_trailer);
701
throw new
HttpRequestException
(HttpRequestError.InvalidResponse, SR.net_http_invalid_response);
745
throw new
HttpRequestException
(HttpRequestError.InvalidResponse, SR.net_http_invalid_response);
754
throw new
HttpRequestException
(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_header_name, Encoding.ASCII.GetString(name)));
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (10)
291
throw new
HttpRequestException
(httpRequestError, SR.net_http_client_execution_error, innerException);
301
throw new
HttpRequestException
(HttpRequestError.HttpProtocolError, SR.net_http_client_execution_error, abortException);
316
throw new
HttpRequestException
(httpRequestError, SR.net_http_client_execution_error, _connection.AbortException);
336
throw new
HttpRequestException
(ex.HttpRequestError, SR.net_http_client_execution_error, ex);
341
throw new
HttpRequestException
(HttpRequestError.InvalidResponse, SR.net_http_invalid_response, ex);
346
throw new
HttpRequestException
(HttpRequestError.Unknown, SR.net_http_client_execution_error, ex);
358
throw new
HttpRequestException
(HttpRequestError.Unknown, SR.net_http_client_execution_error, ex);
908
throw new
HttpRequestException
(HttpRequestError.ConfigurationLimitExceeded, SR.Format(SR.net_http_response_headers_exceeded_length, _connection.Pool.Settings.MaxResponseHeadersByteLength));
949
throw new
HttpRequestException
(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_header_name, Encoding.ASCII.GetString(name)));
1308
throw new
HttpRequestException
(httpRequestError, SR.net_http_client_execution_error, _connection.AbortException);
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (11)
1065
throw new
HttpRequestException
(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_status_line, Encoding.ASCII.GetString(line)));
1086
throw new
HttpRequestException
(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_status_line, Encoding.ASCII.GetString(line)));
1094
throw new
HttpRequestException
(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_status_code, Encoding.ASCII.GetString(line.Slice(9, 3))));
1119
throw new
HttpRequestException
(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_status_reason, Encoding.ASCII.GetString(reasonBytes.ToArray())), formatEx);
1125
throw new
HttpRequestException
(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_status_line, Encoding.ASCII.GetString(line)));
1224
throw new
HttpRequestException
(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_header_line, Encoding.ASCII.GetString(buffer.Slice(0, newLineIndex))));
1323
throw new
HttpRequestException
(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_header_name, ""));
1326
throw new
HttpRequestException
(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_header_name, Encoding.ASCII.GetString(name)));
1330
throw new
HttpRequestException
(HttpRequestError.ConfigurationLimitExceeded, SR.Format(SR.net_http_response_headers_exceeded_length, _pool.Settings.MaxResponseHeadersByteLength));
2073
throw new
HttpRequestException
(HttpRequestError.UserAuthenticationError, SR.net_http_authconnectionfailure);
2089
throw new
HttpRequestException
(HttpRequestError.UserAuthenticationError, SR.net_http_authconnectionfailure);
System\Net\Http\SocketsHttpHandler\HttpConnectionBase.cs (1)
185
throw new
HttpRequestException
(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_status_code, Encoding.ASCII.GetString(value)));