http_type/request/
enum.rs

1use crate::*;
2
3#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
4pub enum RequestError {
5    /// HTTP read error with HTTP status
6    HttpRead(HttpStatus),
7    /// TCP stream connection error with HTTP status
8    GetTcpStream(HttpStatus),
9    /// TLS stream connection error with HTTP status
10    GetTlsStream(HttpStatus),
11    /// Connection read error with HTTP status
12    ReadConnection(HttpStatus),
13    /// Request was aborted with HTTP status
14    RequestAborted(HttpStatus),
15    /// TLS stream connection failed with HTTP status
16    TlsStreamConnect(HttpStatus),
17    /// Redirect functionality needs to be enabled with HTTP status
18    NeedOpenRedirect(HttpStatus),
19    /// Maximum redirect times exceeded with HTTP status
20    MaxRedirectTimes(HttpStatus),
21    /// HTTP method not supported with HTTP status
22    MethodsNotSupport(HttpStatus),
23    /// Redirect URL is invalid with HTTP status
24    RedirectInvalidUrl(HttpStatus),
25    /// Client disconnected with HTTP status
26    ClientDisconnected(HttpStatus),
27    /// Redirect URL dead loop detected with HTTP status
28    RedirectUrlDeadLoop(HttpStatus),
29    /// Client closed connection with HTTP status
30    ClientClosedConnection(HttpStatus),
31    /// Incomplete WebSocket frame with HTTP status
32    IncompleteWebSocketFrame(HttpStatus),
33    /// Request too long with HTTP status
34    RequestTooLong(HttpStatus),
35    /// Path too long with HTTP status
36    PathTooLong(HttpStatus),
37    /// Query too long with HTTP status
38    QueryTooLong(HttpStatus),
39    /// Header line too long with HTTP status
40    HeaderLineTooLong(HttpStatus),
41    /// Too many headers with HTTP status
42    TooManyHeaders(HttpStatus),
43    /// Header key too long with HTTP status
44    HeaderKeyTooLong(HttpStatus),
45    /// Header value too long with HTTP status
46    HeaderValueTooLong(HttpStatus),
47    /// Content length too large with HTTP status
48    ContentLengthTooLarge(HttpStatus),
49    /// Invalid content length with HTTP status
50    InvalidContentLength(HttpStatus),
51    /// Invalid URL scheme with HTTP status
52    InvalidUrlScheme(HttpStatus),
53    /// Invalid URL host with HTTP status
54    InvalidUrlHost(HttpStatus),
55    /// Invalid URL port with HTTP status
56    InvalidUrlPort(HttpStatus),
57    /// Invalid URL path with HTTP status
58    InvalidUrlPath(HttpStatus),
59    /// Invalid URL query with HTTP status
60    InvalidUrlQuery(HttpStatus),
61    /// Invalid URL fragment with HTTP status
62    InvalidUrlFragment(HttpStatus),
63    /// Read timeout not set with HTTP status
64    ReadTimeoutNotSet(HttpStatus),
65    /// Write timeout not set with HTTP status
66    WriteTimeoutNotSet(HttpStatus),
67    /// TCP connection failed with HTTP status
68    TcpConnectionFailed(HttpStatus),
69    /// TLS handshake failed with HTTP status
70    TlsHandshakeFailed(HttpStatus),
71    /// TLS certificate invalid with HTTP status
72    TlsCertificateInvalid(HttpStatus),
73    /// WebSocket frame too large with HTTP status
74    WebSocketFrameTooLarge(HttpStatus),
75    /// WebSocket opcode unsupported with HTTP status
76    WebSocketOpcodeUnsupported(HttpStatus),
77    /// WebSocket mask missing with HTTP status
78    WebSocketMaskMissing(HttpStatus),
79    /// WebSocket payload corrupted with HTTP status
80    WebSocketPayloadCorrupted(HttpStatus),
81    /// WebSocket invalid UTF-8 with HTTP status
82    WebSocketInvalidUtf8(HttpStatus),
83    /// WebSocket invalid close code with HTTP status
84    WebSocketInvalidCloseCode(HttpStatus),
85    /// WebSocket invalid extension with HTTP status
86    WebSocketInvalidExtension(HttpStatus),
87    /// HTTP request parts insufficient with HTTP status
88    HttpRequestPartsInsufficient(HttpStatus),
89    /// TCP stream connection error with HTTP status  
90    TcpStreamConnect(HttpStatus),
91    /// TLS connector build error with HTTP status
92    TlsConnectorBuild(HttpStatus),
93    /// Invalid URL error with HTTP status
94    InvalidUrl(HttpStatus),
95    /// Set read timeout error with HTTP status
96    SetReadTimeout(HttpStatus),
97    /// Set write timeout error with HTTP status
98    SetWriteTimeout(HttpStatus),
99    /// Configuration read error with HTTP status
100    ConfigReadError(HttpStatus),
101    /// TCP stream connection error with HTTP status
102    TcpStreamConnectString(HttpStatus),
103    /// TLS connector build error with HTTP status
104    TlsConnectorBuildString(HttpStatus),
105    /// Set read timeout error with HTTP status
106    SetReadTimeoutString(HttpStatus),
107    /// Set write timeout error with HTTP status
108    SetWriteTimeoutString(HttpStatus),
109    /// Unknown error with HTTP status
110    Unknown(HttpStatus),
111}