44 references to HttpRequestException
Aspire.Cli.Tests (12)
Commands\TelemetryCommandTests.cs (3)
345throw new HttpRequestException("Connection refused"); 355throw new HttpRequestException("Connection refused"); 449using var handler = new MockHttpMessageHandler(new HttpRequestException("Connection refused"));
Commands\TelemetryLogsCommandTests.cs (2)
424throw new HttpRequestException("Connection refused"); 454throw new HttpRequestException("Connection refused");
Mcp\Docs\DocsFetcherTests.cs (2)
195using var handler = new MockHttpMessageHandler(new HttpRequestException("Network error")); 383using var handler = new MockHttpMessageHandler(new HttpRequestException("Network error"));
Mcp\Docs\DocsIndexServiceTests.cs (1)
805var fetcher = new ThrowingDocsFetcher(new HttpRequestException("Network error"));
ProfileCaptureServiceTests.cs (4)
200throw new HttpRequestException("not ready"); 225throw new HttpRequestException("connection refused"); 245new MockHttpMessageHandler(new HttpRequestException("not ready")), 264throw new HttpRequestException("not ready");
Aspire.Hosting.Azure.Tests (6)
AcrLoginServiceTests.cs (1)
22throw new HttpRequestException("Name or service not known");
AzureSandboxesTests.cs (5)
1315? Task.FromException<HttpResponseMessage>(new HttpRequestException("connection reset")) 1336return Task.FromException<HttpResponseMessage>(new HttpRequestException("connection reset")); 2875throw new HttpRequestException("connection reset"); 2920new HttpRequestException("create response lost"), 3004private readonly Exception _portRemovalException = portRemovalException ?? new HttpRequestException("port removal failed");
Microsoft.AspNetCore.Authentication.Facebook (1)
FacebookHandler.cs (1)
55throw new HttpRequestException($"An error occurred when retrieving Facebook user information ({response.StatusCode}). Please check if the authentication information is correct and the corresponding Facebook Graph API is enabled.");
Microsoft.AspNetCore.Authentication.Google (1)
GoogleHandler.cs (1)
53throw new HttpRequestException($"An error occurred when retrieving Google user information ({response.StatusCode}). Please check if the authentication information is correct.");
Microsoft.AspNetCore.Authentication.MicrosoftAccount (1)
MicrosoftAccountHandler.cs (1)
49throw new HttpRequestException($"An error occurred when retrieving Microsoft user information ({response.StatusCode}). Please check if the authentication information is correct and the corresponding Microsoft Account API is enabled.");
Microsoft.AspNetCore.Server.Kestrel.Core (1)
src\aspnetcore\src\Shared\runtime\Http2\Hpack\HPackEncoder.cs (1)
403throw new HttpRequestException(SR.net_http_request_invalid_char_encoding);
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Logging\HttpClientLoggingExtensionsTest.cs (1)
696: throw new HttpRequestException("Simulated failure");
Microsoft.Extensions.Http.Resilience.Tests (1)
Hedging\HedgingTests.cs (1)
355throw new HttpRequestException("Something went wrong!");
System.Net.Http (19)
src\runtime\src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\HPackEncoder.cs (1)
403throw new HttpRequestException(SR.net_http_request_invalid_char_encoding);
System\Net\Http\HttpContent.cs (1)
235throw new HttpRequestException(SR.net_http_content_read_as_stream_has_task);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (2)
697stream = await streamTask.ConfigureAwait(false) ?? throw new HttpRequestException(SR.net_http_null_from_connect_callback); 792throw new HttpRequestException(SR.net_http_null_from_plaintext_filter);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http2.cs (2)
209connectionException = new HttpRequestException(SR.Format(SR.net_ssl_http2_requires_tls12, sslStream.SslProtocol)); 497HttpRequestException hre = new HttpRequestException(SR.net_http_http2_connection_not_established);
System\Net\Http\SocketsHttpHandler\ContentLengthWriteStream.cs (3)
29throw new HttpRequestException(SR.net_http_content_write_larger_than_content_length); 43return ValueTask.FromException(ExceptionDispatchInfo.SetCurrentStackTrace(new HttpRequestException(SR.net_http_content_write_larger_than_content_length))); 55return Task.FromException(ExceptionDispatchInfo.SetCurrentStackTrace(new HttpRequestException(SR.Format(SR.net_http_request_content_length_mismatch, BytesWritten, _contentLength))));
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (1)
1641throw new HttpRequestException(SR.Format(SR.net_http_request_headers_exceeded_length, maxHeaderListSize));
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (2)
232throw new HttpRequestException(SR.Format(SR.net_http_request_content_length_mismatch, writeStream.BytesWritten, writeStream.ContentLength)); 1537return ValueTask.FromException(ExceptionDispatchInfo.SetCurrentStackTrace(new HttpRequestException(SR.net_http_content_write_larger_than_content_length)));
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (3)
496throw new HttpRequestException(SR.Format(SR.net_http_request_content_length_mismatch, sent, contentLength)); 547throw new HttpRequestException(SR.net_http_content_write_larger_than_content_length); 764throw new HttpRequestException(SR.Format(SR.net_http_request_headers_exceeded_length, maxHeaderListSize));
System\Net\Http\SocketsHttpHandler\HttpAuthority.cs (1)
46throw new HttpRequestException(SR.net_http_request_invalid_host_punycode);
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (3)
323throw new HttpRequestException(SR.net_http_request_no_host); 530throw new HttpRequestException(SR.net_http_request_invalid_char_encoding); 1645throw new HttpRequestException(SR.net_http_chunk_too_large);
System.Net.Http.Json (1)
System\Net\Http\Json\LengthLimitReadStream.cs (1)
33throw new HttpRequestException(SR.Format(SR.net_http_content_buffersize_exceeded, limit));