OLD | NEW |
| (Empty) |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // This file intentionally does not have header guards, it's included | |
6 // inside a macro to generate enum values. | |
7 | |
8 // This file contains the list of network errors. | |
9 | |
10 // | |
11 // Ranges: | |
12 // 0- 99 System related errors | |
13 // 100-199 Connection related errors | |
14 | |
15 // An asynchronous IO operation is not yet complete. This usually does not | |
16 // indicate a fatal error. Typically this error will be generated as a | |
17 // notification to wait for some external notification that the IO operation | |
18 // finally completed. | |
19 NET_ERROR(IO_PENDING, -1) | |
20 | |
21 // A generic failure occurred. | |
22 NET_ERROR(FAILED, -2) | |
23 | |
24 // An operation was aborted (due to user action). | |
25 NET_ERROR(ABORTED, -3) | |
26 | |
27 // An argument to the function is incorrect. | |
28 NET_ERROR(INVALID_ARGUMENT, -4) | |
29 | |
30 // The handle or file descriptor is invalid. | |
31 NET_ERROR(INVALID_HANDLE, -5) | |
32 | |
33 // The file or directory cannot be found. | |
34 NET_ERROR(FILE_NOT_FOUND, -6) | |
35 | |
36 // An operation timed out. | |
37 NET_ERROR(TIMED_OUT, -7) | |
38 | |
39 // The file is too large. | |
40 NET_ERROR(FILE_TOO_BIG, -8) | |
41 | |
42 // An unexpected error. This may be caused by a programming mistake or an | |
43 // invalid assumption. | |
44 NET_ERROR(UNEXPECTED, -9) | |
45 | |
46 // Permission to access a resource, other than the network, was denied. | |
47 NET_ERROR(ACCESS_DENIED, -10) | |
48 | |
49 // The operation failed because of unimplemented functionality. | |
50 NET_ERROR(NOT_IMPLEMENTED, -11) | |
51 | |
52 // There were not enough resources to complete the operation. | |
53 NET_ERROR(INSUFFICIENT_RESOURCES, -12) | |
54 | |
55 // Memory allocation failed. | |
56 NET_ERROR(OUT_OF_MEMORY, -13) | |
57 | |
58 // The file upload failed because the file's modification time was different | |
59 // from the expectation. | |
60 NET_ERROR(UPLOAD_FILE_CHANGED, -14) | |
61 | |
62 // The socket is not connected. | |
63 NET_ERROR(SOCKET_NOT_CONNECTED, -15) | |
64 | |
65 // The file already exists. | |
66 NET_ERROR(FILE_EXISTS, -16) | |
67 | |
68 // The path or file name is too long. | |
69 NET_ERROR(FILE_PATH_TOO_LONG, -17) | |
70 | |
71 // Not enough room left on the disk. | |
72 NET_ERROR(FILE_NO_SPACE, -18) | |
73 | |
74 // The file has a virus. | |
75 NET_ERROR(FILE_VIRUS_INFECTED, -19) | |
76 | |
77 // The client chose to block the request. | |
78 NET_ERROR(BLOCKED_BY_CLIENT, -20) | |
79 | |
80 // The network changed. | |
81 NET_ERROR(NETWORK_CHANGED, -21) | |
82 | |
83 // The request was blocked by the URL blacklist configured by the domain | |
84 // administrator. | |
85 NET_ERROR(BLOCKED_BY_ADMINISTRATOR, -22) | |
86 | |
87 // The socket is already connected. | |
88 NET_ERROR(SOCKET_IS_CONNECTED, -23) | |
89 | |
90 // The request was blocked because the forced reenrollment check is still | |
91 // pending. This error can only occur on ChromeOS. | |
92 // The error can be emitted by code in chrome/browser/policy/policy_helpers.cc. | |
93 NET_ERROR(BLOCKED_ENROLLMENT_CHECK_PENDING, -24) | |
94 | |
95 // The upload failed because the upload stream needed to be re-read, due to a | |
96 // retry or a redirect, but the upload stream doesn't support that operation. | |
97 NET_ERROR(UPLOAD_STREAM_REWIND_NOT_SUPPORTED, -25) | |
98 | |
99 // A connection was closed (corresponding to a TCP FIN). | |
100 NET_ERROR(CONNECTION_CLOSED, -100) | |
101 | |
102 // A connection was reset (corresponding to a TCP RST). | |
103 NET_ERROR(CONNECTION_RESET, -101) | |
104 | |
105 // A connection attempt was refused. | |
106 NET_ERROR(CONNECTION_REFUSED, -102) | |
107 | |
108 // A connection timed out as a result of not receiving an ACK for data sent. | |
109 // This can include a FIN packet that did not get ACK'd. | |
110 NET_ERROR(CONNECTION_ABORTED, -103) | |
111 | |
112 // A connection attempt failed. | |
113 NET_ERROR(CONNECTION_FAILED, -104) | |
114 | |
115 // The host name could not be resolved. | |
116 NET_ERROR(NAME_NOT_RESOLVED, -105) | |
117 | |
118 // The Internet connection has been lost. | |
119 NET_ERROR(INTERNET_DISCONNECTED, -106) | |
120 | |
121 // An SSL protocol error occurred. | |
122 NET_ERROR(SSL_PROTOCOL_ERROR, -107) | |
123 | |
124 // The IP address or port number is invalid (e.g., cannot connect to the IP | |
125 // address 0 or the port 0). | |
126 NET_ERROR(ADDRESS_INVALID, -108) | |
127 | |
128 // The IP address is unreachable. This usually means that there is no route to | |
129 // the specified host or network. | |
130 NET_ERROR(ADDRESS_UNREACHABLE, -109) | |
131 | |
132 // The server requested a client certificate for SSL client authentication. | |
133 NET_ERROR(SSL_CLIENT_AUTH_CERT_NEEDED, -110) | |
134 | |
135 // A tunnel connection through the proxy could not be established. | |
136 NET_ERROR(TUNNEL_CONNECTION_FAILED, -111) | |
137 | |
138 // No SSL protocol versions are enabled. | |
139 NET_ERROR(NO_SSL_VERSIONS_ENABLED, -112) | |
140 | |
141 // The client and server don't support a common SSL protocol version or | |
142 // cipher suite. | |
143 NET_ERROR(SSL_VERSION_OR_CIPHER_MISMATCH, -113) | |
144 | |
145 // The server requested a renegotiation (rehandshake). | |
146 NET_ERROR(SSL_RENEGOTIATION_REQUESTED, -114) | |
147 | |
148 // The proxy requested authentication (for tunnel establishment) with an | |
149 // unsupported method. | |
150 NET_ERROR(PROXY_AUTH_UNSUPPORTED, -115) | |
151 | |
152 // During SSL renegotiation (rehandshake), the server sent a certificate with | |
153 // an error. | |
154 // | |
155 // Note: this error is not in the -2xx range so that it won't be handled as a | |
156 // certificate error. | |
157 NET_ERROR(CERT_ERROR_IN_SSL_RENEGOTIATION, -116) | |
158 | |
159 // The SSL handshake failed because of a bad or missing client certificate. | |
160 NET_ERROR(BAD_SSL_CLIENT_AUTH_CERT, -117) | |
161 | |
162 // A connection attempt timed out. | |
163 NET_ERROR(CONNECTION_TIMED_OUT, -118) | |
164 | |
165 // There are too many pending DNS resolves, so a request in the queue was | |
166 // aborted. | |
167 NET_ERROR(HOST_RESOLVER_QUEUE_TOO_LARGE, -119) | |
168 | |
169 // Failed establishing a connection to the SOCKS proxy server for a target host. | |
170 NET_ERROR(SOCKS_CONNECTION_FAILED, -120) | |
171 | |
172 // The SOCKS proxy server failed establishing connection to the target host | |
173 // because that host is unreachable. | |
174 NET_ERROR(SOCKS_CONNECTION_HOST_UNREACHABLE, -121) | |
175 | |
176 // The request to negotiate an alternate protocol failed. | |
177 NET_ERROR(NPN_NEGOTIATION_FAILED, -122) | |
178 | |
179 // The peer sent an SSL no_renegotiation alert message. | |
180 NET_ERROR(SSL_NO_RENEGOTIATION, -123) | |
181 | |
182 // Winsock sometimes reports more data written than passed. This is probably | |
183 // due to a broken LSP. | |
184 NET_ERROR(WINSOCK_UNEXPECTED_WRITTEN_BYTES, -124) | |
185 | |
186 // An SSL peer sent us a fatal decompression_failure alert. This typically | |
187 // occurs when a peer selects DEFLATE compression in the mistaken belief that | |
188 // it supports it. | |
189 NET_ERROR(SSL_DECOMPRESSION_FAILURE_ALERT, -125) | |
190 | |
191 // An SSL peer sent us a fatal bad_record_mac alert. This has been observed | |
192 // from servers with buggy DEFLATE support. | |
193 NET_ERROR(SSL_BAD_RECORD_MAC_ALERT, -126) | |
194 | |
195 // The proxy requested authentication (for tunnel establishment). | |
196 NET_ERROR(PROXY_AUTH_REQUESTED, -127) | |
197 | |
198 // A known TLS strict server didn't offer the renegotiation extension. | |
199 NET_ERROR(SSL_UNSAFE_NEGOTIATION, -128) | |
200 | |
201 // The SSL server attempted to use a weak ephemeral Diffie-Hellman key. | |
202 NET_ERROR(SSL_WEAK_SERVER_EPHEMERAL_DH_KEY, -129) | |
203 | |
204 // Could not create a connection to the proxy server. An error occurred | |
205 // either in resolving its name, or in connecting a socket to it. | |
206 // Note that this does NOT include failures during the actual "CONNECT" method | |
207 // of an HTTP proxy. | |
208 NET_ERROR(PROXY_CONNECTION_FAILED, -130) | |
209 | |
210 // A mandatory proxy configuration could not be used. Currently this means | |
211 // that a mandatory PAC script could not be fetched, parsed or executed. | |
212 NET_ERROR(MANDATORY_PROXY_CONFIGURATION_FAILED, -131) | |
213 | |
214 // -132 was formerly ERR_ESET_ANTI_VIRUS_SSL_INTERCEPTION | |
215 | |
216 // We've hit the max socket limit for the socket pool while preconnecting. We | |
217 // don't bother trying to preconnect more sockets. | |
218 NET_ERROR(PRECONNECT_MAX_SOCKET_LIMIT, -133) | |
219 | |
220 // The permission to use the SSL client certificate's private key was denied. | |
221 NET_ERROR(SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED, -134) | |
222 | |
223 // The SSL client certificate has no private key. | |
224 NET_ERROR(SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY, -135) | |
225 | |
226 // The certificate presented by the HTTPS Proxy was invalid. | |
227 NET_ERROR(PROXY_CERTIFICATE_INVALID, -136) | |
228 | |
229 // An error occurred when trying to do a name resolution (DNS). | |
230 NET_ERROR(NAME_RESOLUTION_FAILED, -137) | |
231 | |
232 // Permission to access the network was denied. This is used to distinguish | |
233 // errors that were most likely caused by a firewall from other access denied | |
234 // errors. See also ERR_ACCESS_DENIED. | |
235 NET_ERROR(NETWORK_ACCESS_DENIED, -138) | |
236 | |
237 // The request throttler module cancelled this request to avoid DDOS. | |
238 NET_ERROR(TEMPORARILY_THROTTLED, -139) | |
239 | |
240 // A request to create an SSL tunnel connection through the HTTPS proxy | |
241 // received a non-200 (OK) and non-407 (Proxy Auth) response. The response | |
242 // body might include a description of why the request failed. | |
243 NET_ERROR(HTTPS_PROXY_TUNNEL_RESPONSE, -140) | |
244 | |
245 // We were unable to sign the CertificateVerify data of an SSL client auth | |
246 // handshake with the client certificate's private key. | |
247 // | |
248 // Possible causes for this include the user implicitly or explicitly | |
249 // denying access to the private key, the private key may not be valid for | |
250 // signing, the key may be relying on a cached handle which is no longer | |
251 // valid, or the CSP won't allow arbitrary data to be signed. | |
252 NET_ERROR(SSL_CLIENT_AUTH_SIGNATURE_FAILED, -141) | |
253 | |
254 // The message was too large for the transport. (for example a UDP message | |
255 // which exceeds size threshold). | |
256 NET_ERROR(MSG_TOO_BIG, -142) | |
257 | |
258 // A SPDY session already exists, and should be used instead of this connection. | |
259 NET_ERROR(SPDY_SESSION_ALREADY_EXISTS, -143) | |
260 | |
261 // Error -144 was removed (LIMIT_VIOLATION). | |
262 | |
263 // Websocket protocol error. Indicates that we are terminating the connection | |
264 // due to a malformed frame or other protocol violation. | |
265 NET_ERROR(WS_PROTOCOL_ERROR, -145) | |
266 | |
267 // Connection was aborted for switching to another ptotocol. | |
268 // WebSocket abort SocketStream connection when alternate protocol is found. | |
269 NET_ERROR(PROTOCOL_SWITCHED, -146) | |
270 | |
271 // Returned when attempting to bind an address that is already in use. | |
272 NET_ERROR(ADDRESS_IN_USE, -147) | |
273 | |
274 // An operation failed because the SSL handshake has not completed. | |
275 NET_ERROR(SSL_HANDSHAKE_NOT_COMPLETED, -148) | |
276 | |
277 // SSL peer's public key is invalid. | |
278 NET_ERROR(SSL_BAD_PEER_PUBLIC_KEY, -149) | |
279 | |
280 // The certificate didn't match the built-in public key pins for the host name. | |
281 // The pins are set in net/http/transport_security_state.cc and require that | |
282 // one of a set of public keys exist on the path from the leaf to the root. | |
283 NET_ERROR(SSL_PINNED_KEY_NOT_IN_CERT_CHAIN, -150) | |
284 | |
285 // Server request for client certificate did not contain any types we support. | |
286 NET_ERROR(CLIENT_AUTH_CERT_TYPE_UNSUPPORTED, -151) | |
287 | |
288 // Server requested one type of cert, then requested a different type while the | |
289 // first was still being generated. | |
290 NET_ERROR(ORIGIN_BOUND_CERT_GENERATION_TYPE_MISMATCH, -152) | |
291 | |
292 // An SSL peer sent us a fatal decrypt_error alert. This typically occurs when | |
293 // a peer could not correctly verify a signature (in CertificateVerify or | |
294 // ServerKeyExchange) or validate a Finished message. | |
295 NET_ERROR(SSL_DECRYPT_ERROR_ALERT, -153) | |
296 | |
297 // There are too many pending WebSocketJob instances, so the new job was not | |
298 // pushed to the queue. | |
299 NET_ERROR(WS_THROTTLE_QUEUE_TOO_LARGE, -154) | |
300 | |
301 // There are too many active SocketStream instances, so the new connect request | |
302 // was rejected. | |
303 NET_ERROR(TOO_MANY_SOCKET_STREAMS, -155) | |
304 | |
305 // The SSL server certificate changed in a renegotiation. | |
306 NET_ERROR(SSL_SERVER_CERT_CHANGED, -156) | |
307 | |
308 // The SSL server indicated that an unnecessary TLS version fallback was | |
309 // performed. | |
310 NET_ERROR(SSL_INAPPROPRIATE_FALLBACK, -157) | |
311 | |
312 // Certificate Transparency: All Signed Certificate Timestamps failed to verify. | |
313 NET_ERROR(CT_NO_SCTS_VERIFIED_OK, -158) | |
314 | |
315 // The SSL server sent us a fatal unrecognized_name alert. | |
316 NET_ERROR(SSL_UNRECOGNIZED_NAME_ALERT, -159) | |
317 | |
318 // Failed to set the socket's receive buffer size as requested. | |
319 NET_ERROR(SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR, -160) | |
320 | |
321 // Failed to set the socket's send buffer size as requested. | |
322 NET_ERROR(SOCKET_SET_SEND_BUFFER_SIZE_ERROR, -161) | |
323 | |
324 // Failed to set the socket's receive buffer size as requested, despite success | |
325 // return code from setsockopt. | |
326 NET_ERROR(SOCKET_RECEIVE_BUFFER_SIZE_UNCHANGEABLE, -162) | |
327 | |
328 // Failed to set the socket's send buffer size as requested, despite success | |
329 // return code from setsockopt. | |
330 NET_ERROR(SOCKET_SEND_BUFFER_SIZE_UNCHANGEABLE, -163) | |
331 | |
332 // Failed to import a client certificate from the platform store into the SSL | |
333 // library. | |
334 NET_ERROR(SSL_CLIENT_AUTH_CERT_BAD_FORMAT, -164) | |
335 | |
336 // The SSL server requires falling back to a version older than the configured | |
337 // minimum fallback version, and thus fallback failed. | |
338 NET_ERROR(SSL_FALLBACK_BEYOND_MINIMUM_VERSION, -165) | |
OLD | NEW |