You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Licensed to the .NET Foundation under one or more agreements.
2
+
// The .NET Foundation licenses this file to you under the MIT license.
3
+
4
+
namespaceSystem.Net.Http
5
+
{
6
+
/// <summary>
7
+
/// Defines error categories representing the reason for <see cref="HttpRequestException"/> or <see cref="HttpIOException"/>.
8
+
/// </summary>
9
+
publicenumHttpRequestError
10
+
{
11
+
/// <summary>
12
+
/// A generic or unknown error occurred.
13
+
/// </summary>
14
+
Unknown=0,
15
+
16
+
/// <summary>
17
+
/// The DNS name resolution failed.
18
+
/// </summary>
19
+
NameResolutionError,
20
+
21
+
/// <summary>
22
+
/// A transport-level failure occurred while connecting to the remote endpoint.
23
+
/// </summary>
24
+
ConnectionError,
25
+
26
+
/// <summary>
27
+
/// An error occurred during the TLS handshake.
28
+
/// </summary>
29
+
SecureConnectionError,
30
+
31
+
/// <summary>
32
+
/// An HTTP/2 or HTTP/3 protocol error occurred.
33
+
/// </summary>
34
+
HttpProtocolError,
35
+
36
+
/// <summary>
37
+
/// Extended CONNECT for WebSockets over HTTP/2 is not supported by the peer.
38
+
/// </summary>
39
+
ExtendedConnectNotSupported,
40
+
41
+
/// <summary>
42
+
/// Cannot negotiate the HTTP Version requested.
43
+
/// </summary>
44
+
VersionNegotiationError,
45
+
46
+
/// <summary>
47
+
/// The authentication failed.
48
+
/// </summary>
49
+
UserAuthenticationError,
50
+
51
+
/// <summary>
52
+
/// An error occurred while establishing a connection to the proxy tunnel.
53
+
/// </summary>
54
+
ProxyTunnelError,
55
+
56
+
/// <summary>
57
+
/// An invalid or malformed response has been received.
58
+
/// </summary>
59
+
InvalidResponse,
60
+
61
+
/// <summary>
62
+
/// The response ended prematurely.
63
+
/// </summary>
64
+
ResponseEnded,
65
+
66
+
/// <summary>
67
+
/// The response exceeded a pre-configured limit such as <see cref="HttpClient.MaxResponseContentBufferSize"/> or <see cref="HttpClientHandler.MaxResponseHeadersLength"/>.
@@ -39,6 +35,27 @@ public HttpRequestException(string? message, Exception? inner, HttpStatusCode? s
39
35
StatusCode=statusCode;
40
36
}
41
37
38
+
/// <summary>
39
+
/// Initializes a new instance of the <see cref="HttpRequestException" /> class with a specific message an inner exception, and an HTTP status code and an <see cref="HttpRequestError"/>.
40
+
/// </summary>
41
+
/// <param name="message">A message that describes the current exception.</param>
0 commit comments