25 references to HttpRequestException
Aspire.Cli.Tests (2)
Mcp\Docs\DocsFetcherTests.cs (1)
185
using var handler = new MockHttpMessageHandler(new
HttpRequestException
("Network error"));
Mcp\Docs\DocsIndexServiceTests.cs (1)
583
var fetcher = new ThrowingDocsFetcher(new
HttpRequestException
("Network error"));
Microsoft.AspNetCore.Server.Kestrel.Core (1)
src\aspnetcore\src\Shared\runtime\Http2\Hpack\HPackEncoder.cs (1)
403
throw new
HttpRequestException
(SR.net_http_request_invalid_char_encoding);
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Logging\HttpClientLoggingExtensionsTest.cs (1)
454
: throw new
HttpRequestException
("Simulated failure");
Microsoft.Extensions.Http.Resilience.Tests (1)
Hedging\HedgingTests.cs (1)
355
throw new
HttpRequestException
("Something went wrong!");
System.Net.Http (19)
src\runtime\src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\HPackEncoder.cs (1)
403
throw new
HttpRequestException
(SR.net_http_request_invalid_char_encoding);
System\Net\Http\HttpContent.cs (1)
235
throw new
HttpRequestException
(SR.net_http_content_read_as_stream_has_task);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (2)
674
stream = await streamTask.ConfigureAwait(false) ?? throw new
HttpRequestException
(SR.net_http_null_from_connect_callback);
769
throw new
HttpRequestException
(SR.net_http_null_from_plaintext_filter);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http2.cs (2)
201
connectionException = new
HttpRequestException
(SR.Format(SR.net_ssl_http2_requires_tls12, sslStream.SslProtocol));
489
HttpRequestException hre = new
HttpRequestException
(SR.net_http_http2_connection_not_established);
System\Net\Http\SocketsHttpHandler\ContentLengthWriteStream.cs (3)
29
throw new
HttpRequestException
(SR.net_http_content_write_larger_than_content_length);
43
return ValueTask.FromException(ExceptionDispatchInfo.SetCurrentStackTrace(new
HttpRequestException
(SR.net_http_content_write_larger_than_content_length)));
55
return Task.FromException(ExceptionDispatchInfo.SetCurrentStackTrace(new
HttpRequestException
(SR.Format(SR.net_http_request_content_length_mismatch, BytesWritten, _contentLength))));
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (1)
1586
throw new
HttpRequestException
(SR.Format(SR.net_http_request_headers_exceeded_length, maxHeaderListSize));
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (2)
232
throw new
HttpRequestException
(SR.Format(SR.net_http_request_content_length_mismatch, writeStream.BytesWritten, writeStream.ContentLength));
1537
return ValueTask.FromException(ExceptionDispatchInfo.SetCurrentStackTrace(new
HttpRequestException
(SR.net_http_content_write_larger_than_content_length)));
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (3)
496
throw new
HttpRequestException
(SR.Format(SR.net_http_request_content_length_mismatch, sent, contentLength));
547
throw new
HttpRequestException
(SR.net_http_content_write_larger_than_content_length);
764
throw new
HttpRequestException
(SR.Format(SR.net_http_request_headers_exceeded_length, maxHeaderListSize));
System\Net\Http\SocketsHttpHandler\HttpAuthority.cs (1)
46
throw new
HttpRequestException
(SR.net_http_request_invalid_host_punycode);
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (3)
322
throw new
HttpRequestException
(SR.net_http_request_no_host);
529
throw new
HttpRequestException
(SR.net_http_request_invalid_char_encoding);
1620
throw new
HttpRequestException
(SR.net_http_chunk_too_large);
System.Net.Http.Json (1)
System\Net\Http\Json\LengthLimitReadStream.cs (1)
33
throw new
HttpRequestException
(SR.Format(SR.net_http_content_buffersize_exceeded, limit));