59 references to HttpRequestException
Aspire.Cli.Tests (16)
Commands\TelemetryCommandTests.cs (4)
351throw new HttpRequestException( 543throw new HttpRequestException("Connection refused"); 553throw new HttpRequestException("Connection refused"); 665using var handler = new MockHttpMessageHandler(new HttpRequestException("Connection refused"));
Commands\TelemetryLogsCommandTests.cs (2)
429throw new HttpRequestException("Connection refused"); 459throw 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"));
Mcp\ListStructuredLogsToolTests.cs (1)
139throw new HttpRequestException(
Mcp\ListTracesToolTests.cs (1)
45throw new HttpRequestException(
Mcp\ListTraceStructuredLogsToolTests.cs (1)
39throw new HttpRequestException(
ProfileCaptureServiceTests.cs (4)
264throw new HttpRequestException("not ready"); 289throw new HttpRequestException("connection refused"); 309new MockHttpMessageHandler(new HttpRequestException("not ready")), 328throw new HttpRequestException("not ready");
Aspire.Hosting.Azure.Tests (6)
AcrLoginServiceTests.cs (1)
61throw new HttpRequestException("Name or service not known");
AzureSandboxesTests.cs (5)
1401? Task.FromException<HttpResponseMessage>(new HttpRequestException("connection reset")) 1422return Task.FromException<HttpResponseMessage>(new HttpRequestException("connection reset")); 3457throw new HttpRequestException("connection reset"); 3502new HttpRequestException("create response lost"), 3586private readonly Exception _portRemovalException = portRemovalException ?? new HttpRequestException("port removal failed");
Aspire.Hosting.Native.Core.Tests (11)
DcpWorkloadCleanupTests.cs (8)
63? Task.FromException(new HttpRequestException("Transient failure")) 114? Task.FromException(new HttpRequestException("Transient failure")) 142throw new HttpRequestException("Transient failure"); 175? Task.FromException(new HttpRequestException("Transient failure")) 200? Task.FromException(new HttpRequestException("Transient failure")) 226? Task.FromException(new HttpRequestException("Command cleanup failure")) 229? Task.FromException(new HttpRequestException("Primary cleanup failure")) 282throw new HttpRequestException("Transient service failure");
NativeProviderLifecycleTests.cs (1)
24? Task.FromException(new HttpRequestException("Transient failure"))
NativeSocketIsolationTests.cs (2)
600 => (Exception)new HttpRequestException("secret-controller-token"), 125StartFailure = new HttpRequestException("secret-token-and-controller-address")
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)
698: 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));