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