1 // Copyright (c) 2012 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.
5 // This file intentionally does not have header guards, it's included
6 // inside a macro to generate enum values.
8 // This file contains the list of network errors.
12 // 0- 99 System related errors
13 // 100-199 Connection related errors
14 // 200-299 Certificate errors
15 // 300-399 HTTP errors
16 // 400-499 Cache errors
19 // 700-799 Certificate manager errors
20 // 800-899 DNS resolver errors
22 // An asynchronous IO operation is not yet complete. This usually does not
23 // indicate a fatal error. Typically this error will be generated as a
24 // notification to wait for some external notification that the IO operation
26 NET_ERROR(IO_PENDING
, -1)
28 // A generic failure occurred.
31 // An operation was aborted (due to user action).
32 NET_ERROR(ABORTED
, -3)
34 // An argument to the function is incorrect.
35 NET_ERROR(INVALID_ARGUMENT
, -4)
37 // The handle or file descriptor is invalid.
38 NET_ERROR(INVALID_HANDLE
, -5)
40 // The file or directory cannot be found.
41 NET_ERROR(FILE_NOT_FOUND
, -6)
43 // An operation timed out.
44 NET_ERROR(TIMED_OUT
, -7)
46 // The file is too large.
47 NET_ERROR(FILE_TOO_BIG
, -8)
49 // An unexpected error. This may be caused by a programming mistake or an
50 // invalid assumption.
51 NET_ERROR(UNEXPECTED
, -9)
53 // Permission to access a resource, other than the network, was denied.
54 NET_ERROR(ACCESS_DENIED
, -10)
56 // The operation failed because of unimplemented functionality.
57 NET_ERROR(NOT_IMPLEMENTED
, -11)
59 // There were not enough resources to complete the operation.
60 NET_ERROR(INSUFFICIENT_RESOURCES
, -12)
62 // Memory allocation failed.
63 NET_ERROR(OUT_OF_MEMORY
, -13)
65 // The file upload failed because the file's modification time was different
66 // from the expectation.
67 NET_ERROR(UPLOAD_FILE_CHANGED
, -14)
69 // The socket is not connected.
70 NET_ERROR(SOCKET_NOT_CONNECTED
, -15)
72 // The file already exists.
73 NET_ERROR(FILE_EXISTS
, -16)
75 // The path or file name is too long.
76 NET_ERROR(FILE_PATH_TOO_LONG
, -17)
78 // Not enough room left on the disk.
79 NET_ERROR(FILE_NO_SPACE
, -18)
81 // The file has a virus.
82 NET_ERROR(FILE_VIRUS_INFECTED
, -19)
84 // The client chose to block the request.
85 NET_ERROR(BLOCKED_BY_CLIENT
, -20)
87 // The network changed.
88 NET_ERROR(NETWORK_CHANGED
, -21)
90 // The request was blocked by the URL blacklist configured by the domain
92 NET_ERROR(BLOCKED_BY_ADMINISTRATOR
, -22)
94 // The socket is already connected.
95 NET_ERROR(SOCKET_IS_CONNECTED
, -23)
97 // The request was blocked because the forced reenrollment check is still
98 // pending. This error can only occur on ChromeOS.
99 // The error can be emitted by code in chrome/browser/policy/policy_helpers.cc.
100 NET_ERROR(BLOCKED_ENROLLMENT_CHECK_PENDING
, -24)
102 // The upload failed because the upload stream needed to be re-read, due to a
103 // retry or a redirect, but the upload stream doesn't support that operation.
104 NET_ERROR(UPLOAD_STREAM_REWIND_NOT_SUPPORTED
, -25)
106 // The request failed because the URLRequestContext is shutting down, or has
108 NET_ERROR(CONTEXT_SHUT_DOWN
, -26)
110 // A connection was closed (corresponding to a TCP FIN).
111 NET_ERROR(CONNECTION_CLOSED
, -100)
113 // A connection was reset (corresponding to a TCP RST).
114 NET_ERROR(CONNECTION_RESET
, -101)
116 // A connection attempt was refused.
117 NET_ERROR(CONNECTION_REFUSED
, -102)
119 // A connection timed out as a result of not receiving an ACK for data sent.
120 // This can include a FIN packet that did not get ACK'd.
121 NET_ERROR(CONNECTION_ABORTED
, -103)
123 // A connection attempt failed.
124 NET_ERROR(CONNECTION_FAILED
, -104)
126 // The host name could not be resolved.
127 NET_ERROR(NAME_NOT_RESOLVED
, -105)
129 // The Internet connection has been lost.
130 NET_ERROR(INTERNET_DISCONNECTED
, -106)
132 // An SSL protocol error occurred.
133 NET_ERROR(SSL_PROTOCOL_ERROR
, -107)
135 // The IP address or port number is invalid (e.g., cannot connect to the IP
136 // address 0 or the port 0).
137 NET_ERROR(ADDRESS_INVALID
, -108)
139 // The IP address is unreachable. This usually means that there is no route to
140 // the specified host or network.
141 NET_ERROR(ADDRESS_UNREACHABLE
, -109)
143 // The server requested a client certificate for SSL client authentication.
144 NET_ERROR(SSL_CLIENT_AUTH_CERT_NEEDED
, -110)
146 // A tunnel connection through the proxy could not be established.
147 NET_ERROR(TUNNEL_CONNECTION_FAILED
, -111)
149 // No SSL protocol versions are enabled.
150 NET_ERROR(NO_SSL_VERSIONS_ENABLED
, -112)
152 // The client and server don't support a common SSL protocol version or
154 NET_ERROR(SSL_VERSION_OR_CIPHER_MISMATCH
, -113)
156 // The server requested a renegotiation (rehandshake).
157 NET_ERROR(SSL_RENEGOTIATION_REQUESTED
, -114)
159 // The proxy requested authentication (for tunnel establishment) with an
160 // unsupported method.
161 NET_ERROR(PROXY_AUTH_UNSUPPORTED
, -115)
163 // During SSL renegotiation (rehandshake), the server sent a certificate with
166 // Note: this error is not in the -2xx range so that it won't be handled as a
167 // certificate error.
168 NET_ERROR(CERT_ERROR_IN_SSL_RENEGOTIATION
, -116)
170 // The SSL handshake failed because of a bad or missing client certificate.
171 NET_ERROR(BAD_SSL_CLIENT_AUTH_CERT
, -117)
173 // A connection attempt timed out.
174 NET_ERROR(CONNECTION_TIMED_OUT
, -118)
176 // There are too many pending DNS resolves, so a request in the queue was
178 NET_ERROR(HOST_RESOLVER_QUEUE_TOO_LARGE
, -119)
180 // Failed establishing a connection to the SOCKS proxy server for a target host.
181 NET_ERROR(SOCKS_CONNECTION_FAILED
, -120)
183 // The SOCKS proxy server failed establishing connection to the target host
184 // because that host is unreachable.
185 NET_ERROR(SOCKS_CONNECTION_HOST_UNREACHABLE
, -121)
187 // The request to negotiate an alternate protocol failed.
188 NET_ERROR(NPN_NEGOTIATION_FAILED
, -122)
190 // The peer sent an SSL no_renegotiation alert message.
191 NET_ERROR(SSL_NO_RENEGOTIATION
, -123)
193 // Winsock sometimes reports more data written than passed. This is probably
194 // due to a broken LSP.
195 NET_ERROR(WINSOCK_UNEXPECTED_WRITTEN_BYTES
, -124)
197 // An SSL peer sent us a fatal decompression_failure alert. This typically
198 // occurs when a peer selects DEFLATE compression in the mistaken belief that
200 NET_ERROR(SSL_DECOMPRESSION_FAILURE_ALERT
, -125)
202 // An SSL peer sent us a fatal bad_record_mac alert. This has been observed
203 // from servers with buggy DEFLATE support.
204 NET_ERROR(SSL_BAD_RECORD_MAC_ALERT
, -126)
206 // The proxy requested authentication (for tunnel establishment).
207 NET_ERROR(PROXY_AUTH_REQUESTED
, -127)
209 // The SSL server attempted to use a weak ephemeral Diffie-Hellman key.
210 NET_ERROR(SSL_WEAK_SERVER_EPHEMERAL_DH_KEY
, -129)
212 // Could not create a connection to the proxy server. An error occurred
213 // either in resolving its name, or in connecting a socket to it.
214 // Note that this does NOT include failures during the actual "CONNECT" method
216 NET_ERROR(PROXY_CONNECTION_FAILED
, -130)
218 // A mandatory proxy configuration could not be used. Currently this means
219 // that a mandatory PAC script could not be fetched, parsed or executed.
220 NET_ERROR(MANDATORY_PROXY_CONFIGURATION_FAILED
, -131)
222 // -132 was formerly ERR_ESET_ANTI_VIRUS_SSL_INTERCEPTION
224 // We've hit the max socket limit for the socket pool while preconnecting. We
225 // don't bother trying to preconnect more sockets.
226 NET_ERROR(PRECONNECT_MAX_SOCKET_LIMIT
, -133)
228 // The permission to use the SSL client certificate's private key was denied.
229 NET_ERROR(SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED
, -134)
231 // The SSL client certificate has no private key.
232 NET_ERROR(SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY
, -135)
234 // The certificate presented by the HTTPS Proxy was invalid.
235 NET_ERROR(PROXY_CERTIFICATE_INVALID
, -136)
237 // An error occurred when trying to do a name resolution (DNS).
238 NET_ERROR(NAME_RESOLUTION_FAILED
, -137)
240 // Permission to access the network was denied. This is used to distinguish
241 // errors that were most likely caused by a firewall from other access denied
242 // errors. See also ERR_ACCESS_DENIED.
243 NET_ERROR(NETWORK_ACCESS_DENIED
, -138)
245 // The request throttler module cancelled this request to avoid DDOS.
246 NET_ERROR(TEMPORARILY_THROTTLED
, -139)
248 // A request to create an SSL tunnel connection through the HTTPS proxy
249 // received a non-200 (OK) and non-407 (Proxy Auth) response. The response
250 // body might include a description of why the request failed.
251 NET_ERROR(HTTPS_PROXY_TUNNEL_RESPONSE
, -140)
253 // We were unable to sign the CertificateVerify data of an SSL client auth
254 // handshake with the client certificate's private key.
256 // Possible causes for this include the user implicitly or explicitly
257 // denying access to the private key, the private key may not be valid for
258 // signing, the key may be relying on a cached handle which is no longer
259 // valid, or the CSP won't allow arbitrary data to be signed.
260 NET_ERROR(SSL_CLIENT_AUTH_SIGNATURE_FAILED
, -141)
262 // The message was too large for the transport. (for example a UDP message
263 // which exceeds size threshold).
264 NET_ERROR(MSG_TOO_BIG
, -142)
266 // A SPDY session already exists, and should be used instead of this connection.
267 NET_ERROR(SPDY_SESSION_ALREADY_EXISTS
, -143)
269 // Error -144 was removed (LIMIT_VIOLATION).
271 // Websocket protocol error. Indicates that we are terminating the connection
272 // due to a malformed frame or other protocol violation.
273 NET_ERROR(WS_PROTOCOL_ERROR
, -145)
275 // Error -146 was removed (PROTOCOL_SWITCHED)
277 // Returned when attempting to bind an address that is already in use.
278 NET_ERROR(ADDRESS_IN_USE
, -147)
280 // An operation failed because the SSL handshake has not completed.
281 NET_ERROR(SSL_HANDSHAKE_NOT_COMPLETED
, -148)
283 // SSL peer's public key is invalid.
284 NET_ERROR(SSL_BAD_PEER_PUBLIC_KEY
, -149)
286 // The certificate didn't match the built-in public key pins for the host name.
287 // The pins are set in net/http/transport_security_state.cc and require that
288 // one of a set of public keys exist on the path from the leaf to the root.
289 NET_ERROR(SSL_PINNED_KEY_NOT_IN_CERT_CHAIN
, -150)
291 // Server request for client certificate did not contain any types we support.
292 NET_ERROR(CLIENT_AUTH_CERT_TYPE_UNSUPPORTED
, -151)
294 // Server requested one type of cert, then requested a different type while the
295 // first was still being generated.
296 NET_ERROR(ORIGIN_BOUND_CERT_GENERATION_TYPE_MISMATCH
, -152)
298 // An SSL peer sent us a fatal decrypt_error alert. This typically occurs when
299 // a peer could not correctly verify a signature (in CertificateVerify or
300 // ServerKeyExchange) or validate a Finished message.
301 NET_ERROR(SSL_DECRYPT_ERROR_ALERT
, -153)
303 // There are too many pending WebSocketJob instances, so the new job was not
304 // pushed to the queue.
305 NET_ERROR(WS_THROTTLE_QUEUE_TOO_LARGE
, -154)
307 // Error -155 was removed (TOO_MANY_SOCKET_STREAMS)
309 // The SSL server certificate changed in a renegotiation.
310 NET_ERROR(SSL_SERVER_CERT_CHANGED
, -156)
312 // The SSL server indicated that an unnecessary TLS version fallback was
314 NET_ERROR(SSL_INAPPROPRIATE_FALLBACK
, -157)
316 // Certificate Transparency: All Signed Certificate Timestamps failed to verify.
317 NET_ERROR(CT_NO_SCTS_VERIFIED_OK
, -158)
319 // The SSL server sent us a fatal unrecognized_name alert.
320 NET_ERROR(SSL_UNRECOGNIZED_NAME_ALERT
, -159)
322 // Failed to set the socket's receive buffer size as requested.
323 NET_ERROR(SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR
, -160)
325 // Failed to set the socket's send buffer size as requested.
326 NET_ERROR(SOCKET_SET_SEND_BUFFER_SIZE_ERROR
, -161)
328 // Failed to set the socket's receive buffer size as requested, despite success
329 // return code from setsockopt.
330 NET_ERROR(SOCKET_RECEIVE_BUFFER_SIZE_UNCHANGEABLE
, -162)
332 // Failed to set the socket's send buffer size as requested, despite success
333 // return code from setsockopt.
334 NET_ERROR(SOCKET_SEND_BUFFER_SIZE_UNCHANGEABLE
, -163)
336 // Failed to import a client certificate from the platform store into the SSL
338 NET_ERROR(SSL_CLIENT_AUTH_CERT_BAD_FORMAT
, -164)
340 // The SSL server requires falling back to a version older than the configured
341 // minimum fallback version, and thus fallback failed.
342 NET_ERROR(SSL_FALLBACK_BEYOND_MINIMUM_VERSION
, -165)
344 // Resolving a hostname to an IP address list included the IPv4 address
345 // "127.0.53.53". This is a special IP address which ICANN has recommended to
346 // indicate there was a name collision, and alert admins to a potential
348 NET_ERROR(ICANN_NAME_COLLISION
, -166)
350 // The SSL server presented a certificate which could not be decoded. This is
351 // not a certificate error code as no X509Certificate object is available. This
353 NET_ERROR(SSL_SERVER_CERT_BAD_FORMAT
, -167)
354 // Certificate Transparency: Received a signed tree head that failed to parse.
355 NET_ERROR(CT_STH_PARSING_FAILED
, -168)
356 // Certificate Transparency: Received a signed tree head whose JSON parsing was
357 // OK but was missing some of the fields.
358 NET_ERROR(CT_STH_INCOMPLETE
, -169)
360 // Certificate error codes
362 // The values of certificate error codes must be consecutive.
364 // The server responded with a certificate whose common name did not match
365 // the host name. This could mean:
367 // 1. An attacker has redirected our traffic to their server and is
368 // presenting a certificate for which they know the private key.
370 // 2. The server is misconfigured and responding with the wrong cert.
372 // 3. The user is on a wireless network and is being redirected to the
373 // network's login page.
375 // 4. The OS has used a DNS search suffix and the server doesn't have
376 // a certificate for the abbreviated name in the address bar.
378 NET_ERROR(CERT_COMMON_NAME_INVALID
, -200)
380 // The server responded with a certificate that, by our clock, appears to
381 // either not yet be valid or to have expired. This could mean:
383 // 1. An attacker is presenting an old certificate for which they have
384 // managed to obtain the private key.
386 // 2. The server is misconfigured and is not presenting a valid cert.
388 // 3. Our clock is wrong.
390 NET_ERROR(CERT_DATE_INVALID
, -201)
392 // The server responded with a certificate that is signed by an authority
393 // we don't trust. The could mean:
395 // 1. An attacker has substituted the real certificate for a cert that
396 // contains their public key and is signed by their cousin.
398 // 2. The server operator has a legitimate certificate from a CA we don't
399 // know about, but should trust.
401 // 3. The server is presenting a self-signed certificate, providing no
402 // defense against active attackers (but foiling passive attackers).
404 NET_ERROR(CERT_AUTHORITY_INVALID
, -202)
406 // The server responded with a certificate that contains errors.
407 // This error is not recoverable.
409 // MSDN describes this error as follows:
410 // "The SSL certificate contains errors."
411 // NOTE: It's unclear how this differs from ERR_CERT_INVALID. For consistency,
412 // use that code instead of this one from now on.
414 NET_ERROR(CERT_CONTAINS_ERRORS
, -203)
416 // The certificate has no mechanism for determining if it is revoked. In
417 // effect, this certificate cannot be revoked.
418 NET_ERROR(CERT_NO_REVOCATION_MECHANISM
, -204)
420 // Revocation information for the security certificate for this site is not
421 // available. This could mean:
423 // 1. An attacker has compromised the private key in the certificate and is
424 // blocking our attempt to find out that the cert was revoked.
426 // 2. The certificate is unrevoked, but the revocation server is busy or
429 NET_ERROR(CERT_UNABLE_TO_CHECK_REVOCATION
, -205)
431 // The server responded with a certificate has been revoked.
432 // We have the capability to ignore this error, but it is probably not the
434 NET_ERROR(CERT_REVOKED
, -206)
436 // The server responded with a certificate that is invalid.
437 // This error is not recoverable.
439 // MSDN describes this error as follows:
440 // "The SSL certificate is invalid."
442 NET_ERROR(CERT_INVALID
, -207)
444 // The server responded with a certificate that is signed using a weak
445 // signature algorithm.
446 NET_ERROR(CERT_WEAK_SIGNATURE_ALGORITHM
, -208)
448 // -209 is availible: was CERT_NOT_IN_DNS.
450 // The host name specified in the certificate is not unique.
451 NET_ERROR(CERT_NON_UNIQUE_NAME
, -210)
453 // The server responded with a certificate that contains a weak key (e.g.
454 // a too-small RSA key).
455 NET_ERROR(CERT_WEAK_KEY
, -211)
457 // The certificate claimed DNS names that are in violation of name constraints.
458 NET_ERROR(CERT_NAME_CONSTRAINT_VIOLATION
, -212)
460 // The certificate's validity period is too long.
461 NET_ERROR(CERT_VALIDITY_TOO_LONG
, -213)
463 // Add new certificate error codes here.
465 // Update the value of CERT_END whenever you add a new certificate error
468 // The value immediately past the last certificate error code.
469 NET_ERROR(CERT_END
, -214)
471 // The URL is invalid.
472 NET_ERROR(INVALID_URL
, -300)
474 // The scheme of the URL is disallowed.
475 NET_ERROR(DISALLOWED_URL_SCHEME
, -301)
477 // The scheme of the URL is unknown.
478 NET_ERROR(UNKNOWN_URL_SCHEME
, -302)
480 // Attempting to load an URL resulted in too many redirects.
481 NET_ERROR(TOO_MANY_REDIRECTS
, -310)
483 // Attempting to load an URL resulted in an unsafe redirect (e.g., a redirect
484 // to file:// is considered unsafe).
485 NET_ERROR(UNSAFE_REDIRECT
, -311)
487 // Attempting to load an URL with an unsafe port number. These are port
488 // numbers that correspond to services, which are not robust to spurious input
489 // that may be constructed as a result of an allowed web construct (e.g., HTTP
490 // looks a lot like SMTP, so form submission to port 25 is denied).
491 NET_ERROR(UNSAFE_PORT
, -312)
493 // The server's response was invalid.
494 NET_ERROR(INVALID_RESPONSE
, -320)
496 // Error in chunked transfer encoding.
497 NET_ERROR(INVALID_CHUNKED_ENCODING
, -321)
499 // The server did not support the request method.
500 NET_ERROR(METHOD_NOT_SUPPORTED
, -322)
502 // The response was 407 (Proxy Authentication Required), yet we did not send
503 // the request to a proxy.
504 NET_ERROR(UNEXPECTED_PROXY_AUTH
, -323)
506 // The server closed the connection without sending any data.
507 NET_ERROR(EMPTY_RESPONSE
, -324)
509 // The headers section of the response is too large.
510 NET_ERROR(RESPONSE_HEADERS_TOO_BIG
, -325)
512 // The PAC requested by HTTP did not have a valid status code (non-200).
513 NET_ERROR(PAC_STATUS_NOT_OK
, -326)
515 // The evaluation of the PAC script failed.
516 NET_ERROR(PAC_SCRIPT_FAILED
, -327)
518 // The response was 416 (Requested range not satisfiable) and the server cannot
519 // satisfy the range requested.
520 NET_ERROR(REQUEST_RANGE_NOT_SATISFIABLE
, -328)
522 // The identity used for authentication is invalid.
523 NET_ERROR(MALFORMED_IDENTITY
, -329)
525 // Content decoding of the response body failed.
526 NET_ERROR(CONTENT_DECODING_FAILED
, -330)
528 // An operation could not be completed because all network IO
530 NET_ERROR(NETWORK_IO_SUSPENDED
, -331)
532 // FLIP data received without receiving a SYN_REPLY on the stream.
533 NET_ERROR(SYN_REPLY_NOT_RECEIVED
, -332)
535 // Converting the response to target encoding failed.
536 NET_ERROR(ENCODING_CONVERSION_FAILED
, -333)
538 // The server sent an FTP directory listing in a format we do not understand.
539 NET_ERROR(UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT
, -334)
541 // Attempted use of an unknown SPDY stream id.
542 NET_ERROR(INVALID_SPDY_STREAM
, -335)
544 // There are no supported proxies in the provided list.
545 NET_ERROR(NO_SUPPORTED_PROXIES
, -336)
547 // There is a SPDY protocol error.
548 NET_ERROR(SPDY_PROTOCOL_ERROR
, -337)
550 // Credentials could not be established during HTTP Authentication.
551 NET_ERROR(INVALID_AUTH_CREDENTIALS
, -338)
553 // An HTTP Authentication scheme was tried which is not supported on this
555 NET_ERROR(UNSUPPORTED_AUTH_SCHEME
, -339)
557 // Detecting the encoding of the response failed.
558 NET_ERROR(ENCODING_DETECTION_FAILED
, -340)
560 // (GSSAPI) No Kerberos credentials were available during HTTP Authentication.
561 NET_ERROR(MISSING_AUTH_CREDENTIALS
, -341)
563 // An unexpected, but documented, SSPI or GSSAPI status code was returned.
564 NET_ERROR(UNEXPECTED_SECURITY_LIBRARY_STATUS
, -342)
566 // The environment was not set up correctly for authentication (for
567 // example, no KDC could be found or the principal is unknown.
568 NET_ERROR(MISCONFIGURED_AUTH_ENVIRONMENT
, -343)
570 // An undocumented SSPI or GSSAPI status code was returned.
571 NET_ERROR(UNDOCUMENTED_SECURITY_LIBRARY_STATUS
, -344)
573 // The HTTP response was too big to drain.
574 NET_ERROR(RESPONSE_BODY_TOO_BIG_TO_DRAIN
, -345)
576 // The HTTP response contained multiple distinct Content-Length headers.
577 NET_ERROR(RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH
, -346)
579 // SPDY Headers have been received, but not all of them - status or version
580 // headers are missing, so we're expecting additional frames to complete them.
581 NET_ERROR(INCOMPLETE_SPDY_HEADERS
, -347)
583 // No PAC URL configuration could be retrieved from DHCP. This can indicate
584 // either a failure to retrieve the DHCP configuration, or that there was no
585 // PAC URL configured in DHCP.
586 NET_ERROR(PAC_NOT_IN_DHCP
, -348)
588 // The HTTP response contained multiple Content-Disposition headers.
589 NET_ERROR(RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION
, -349)
591 // The HTTP response contained multiple Location headers.
592 NET_ERROR(RESPONSE_HEADERS_MULTIPLE_LOCATION
, -350)
594 // SPDY server refused the stream. Client should retry. This should never be a
595 // user-visible error.
596 NET_ERROR(SPDY_SERVER_REFUSED_STREAM
, -351)
598 // SPDY server didn't respond to the PING message.
599 NET_ERROR(SPDY_PING_FAILED
, -352)
601 // Obsolete. Kept here to avoid reuse, as the old error can still appear on
603 // NET_ERROR(PIPELINE_EVICTION, -353)
605 // The HTTP response body transferred fewer bytes than were advertised by the
606 // Content-Length header when the connection is closed.
607 NET_ERROR(CONTENT_LENGTH_MISMATCH
, -354)
609 // The HTTP response body is transferred with Chunked-Encoding, but the
610 // terminating zero-length chunk was never sent when the connection is closed.
611 NET_ERROR(INCOMPLETE_CHUNKED_ENCODING
, -355)
613 // There is a QUIC protocol error.
614 NET_ERROR(QUIC_PROTOCOL_ERROR
, -356)
616 // The HTTP headers were truncated by an EOF.
617 NET_ERROR(RESPONSE_HEADERS_TRUNCATED
, -357)
619 // The QUIC crytpo handshake failed. This means that the server was unable
620 // to read any requests sent, so they may be resent.
621 NET_ERROR(QUIC_HANDSHAKE_FAILED
, -358)
623 // An https resource was requested over an insecure QUIC connection.
624 NET_ERROR(REQUEST_FOR_SECURE_RESOURCE_OVER_INSECURE_QUIC
, -359)
626 // Transport security is inadequate for the SPDY version.
627 NET_ERROR(SPDY_INADEQUATE_TRANSPORT_SECURITY
, -360)
629 // The peer violated SPDY flow control.
630 NET_ERROR(SPDY_FLOW_CONTROL_ERROR
, -361)
632 // The peer sent an improperly sized SPDY frame.
633 NET_ERROR(SPDY_FRAME_SIZE_ERROR
, -362)
635 // Decoding or encoding of compressed SPDY headers failed.
636 NET_ERROR(SPDY_COMPRESSION_ERROR
, -363)
638 // Proxy Auth Requested without a valid Client Socket Handle.
639 NET_ERROR(PROXY_AUTH_REQUESTED_WITH_NO_CONNECTION
, -364)
641 // HTTP_1_1_REQUIRED error code received on HTTP/2 session.
642 NET_ERROR(HTTP_1_1_REQUIRED
, -365)
644 // HTTP_1_1_REQUIRED error code received on HTTP/2 session to proxy.
645 NET_ERROR(PROXY_HTTP_1_1_REQUIRED
, -366)
647 // The PAC script terminated fatally and must be reloaded.
648 NET_ERROR(PAC_SCRIPT_TERMINATED
, -367)
650 // The certificate offered by the alternative server is not valid for the
651 // origin, a violation of HTTP Alternative Services specification Section 2.1,
652 // https://tools.ietf.org/id/draft-ietf-httpbis-alt-svc-06.html#host_auth.
653 NET_ERROR(ALTERNATIVE_CERT_NOT_VALID_FOR_ORIGIN
, -368)
655 // Request is throttled because of a Backoff header.
656 // See: crbug.com/486891.
657 NET_ERROR(TEMPORARY_BACKOFF
, -369)
659 // The cache does not have the requested entry.
660 NET_ERROR(CACHE_MISS
, -400)
662 // Unable to read from the disk cache.
663 NET_ERROR(CACHE_READ_FAILURE
, -401)
665 // Unable to write to the disk cache.
666 NET_ERROR(CACHE_WRITE_FAILURE
, -402)
668 // The operation is not supported for this entry.
669 NET_ERROR(CACHE_OPERATION_NOT_SUPPORTED
, -403)
671 // The disk cache is unable to open this entry.
672 NET_ERROR(CACHE_OPEN_FAILURE
, -404)
674 // The disk cache is unable to create this entry.
675 NET_ERROR(CACHE_CREATE_FAILURE
, -405)
677 // Multiple transactions are racing to create disk cache entries. This is an
678 // internal error returned from the HttpCache to the HttpCacheTransaction that
679 // tells the transaction to restart the entry-creation logic because the state
680 // of the cache has changed.
681 NET_ERROR(CACHE_RACE
, -406)
683 // The cache was unable to read a checksum record on an entry. This can be
684 // returned from attempts to read from the cache. It is an internal error,
685 // returned by the SimpleCache backend, but not by any URLRequest methods
687 NET_ERROR(CACHE_CHECKSUM_READ_FAILURE
, -407)
689 // The cache found an entry with an invalid checksum. This can be returned from
690 // attempts to read from the cache. It is an internal error, returned by the
691 // SimpleCache backend, but not by any URLRequest methods or members.
692 NET_ERROR(CACHE_CHECKSUM_MISMATCH
, -408)
694 // Internal error code for the HTTP cache. The cache lock timeout has fired.
695 NET_ERROR(CACHE_LOCK_TIMEOUT
, -409)
697 // Received a challenge after the transaction has read some data, and the
698 // credentials aren't available. There isn't a way to get them at that point.
699 NET_ERROR(CACHE_AUTH_FAILURE_AFTER_READ
, -410)
701 // The server's response was insecure (e.g. there was a cert error).
702 NET_ERROR(INSECURE_RESPONSE
, -501)
704 // The server responded to a <keygen> with a generated client cert that we
705 // don't have the matching private key for.
706 NET_ERROR(NO_PRIVATE_KEY_FOR_CERT
, -502)
708 // An error adding to the OS certificate database (e.g. OS X Keychain).
709 NET_ERROR(ADD_USER_CERT_FAILED
, -503)
711 // *** Code -600 is reserved (was FTP_PASV_COMMAND_FAILED). ***
713 // A generic error for failed FTP control connection command.
714 // If possible, please use or add a more specific error code.
715 NET_ERROR(FTP_FAILED
, -601)
717 // The server cannot fulfill the request at this point. This is a temporary
719 // FTP response code 421.
720 NET_ERROR(FTP_SERVICE_UNAVAILABLE
, -602)
722 // The server has aborted the transfer.
723 // FTP response code 426.
724 NET_ERROR(FTP_TRANSFER_ABORTED
, -603)
726 // The file is busy, or some other temporary error condition on opening
728 // FTP response code 450.
729 NET_ERROR(FTP_FILE_BUSY
, -604)
731 // Server rejected our command because of syntax errors.
732 // FTP response codes 500, 501.
733 NET_ERROR(FTP_SYNTAX_ERROR
, -605)
735 // Server does not support the command we issued.
736 // FTP response codes 502, 504.
737 NET_ERROR(FTP_COMMAND_NOT_SUPPORTED
, -606)
739 // Server rejected our command because we didn't issue the commands in right
741 // FTP response code 503.
742 NET_ERROR(FTP_BAD_COMMAND_SEQUENCE
, -607)
744 // PKCS #12 import failed due to incorrect password.
745 NET_ERROR(PKCS12_IMPORT_BAD_PASSWORD
, -701)
747 // PKCS #12 import failed due to other error.
748 NET_ERROR(PKCS12_IMPORT_FAILED
, -702)
750 // CA import failed - not a CA cert.
751 NET_ERROR(IMPORT_CA_CERT_NOT_CA
, -703)
753 // Import failed - certificate already exists in database.
754 // Note it's a little weird this is an error but reimporting a PKCS12 is ok
755 // (no-op). That's how Mozilla does it, though.
756 NET_ERROR(IMPORT_CERT_ALREADY_EXISTS
, -704)
758 // CA import failed due to some other error.
759 NET_ERROR(IMPORT_CA_CERT_FAILED
, -705)
761 // Server certificate import failed due to some internal error.
762 NET_ERROR(IMPORT_SERVER_CERT_FAILED
, -706)
764 // PKCS #12 import failed due to invalid MAC.
765 NET_ERROR(PKCS12_IMPORT_INVALID_MAC
, -707)
767 // PKCS #12 import failed due to invalid/corrupt file.
768 NET_ERROR(PKCS12_IMPORT_INVALID_FILE
, -708)
770 // PKCS #12 import failed due to unsupported features.
771 NET_ERROR(PKCS12_IMPORT_UNSUPPORTED
, -709)
773 // Key generation failed.
774 NET_ERROR(KEY_GENERATION_FAILED
, -710)
776 // Error -711 was removed (ORIGIN_BOUND_CERT_GENERATION_FAILED)
778 // Failure to export private key.
779 NET_ERROR(PRIVATE_KEY_EXPORT_FAILED
, -712)
781 // Self-signed certificate generation failed.
782 NET_ERROR(SELF_SIGNED_CERT_GENERATION_FAILED
, -713)
784 // The certificate database changed in some way.
785 NET_ERROR(CERT_DATABASE_CHANGED
, -714)
787 // Failure to import Channel ID.
788 NET_ERROR(CHANNEL_ID_IMPORT_FAILED
, -715)
792 // DNS resolver received a malformed response.
793 NET_ERROR(DNS_MALFORMED_RESPONSE
, -800)
795 // DNS server requires TCP
796 NET_ERROR(DNS_SERVER_REQUIRES_TCP
, -801)
798 // DNS server failed. This error is returned for all of the following
800 // 1 - Format error - The name server was unable to interpret the query.
801 // 2 - Server failure - The name server was unable to process this query
802 // due to a problem with the name server.
803 // 4 - Not Implemented - The name server does not support the requested
805 // 5 - Refused - The name server refuses to perform the specified
806 // operation for policy reasons.
807 NET_ERROR(DNS_SERVER_FAILED
, -802)
809 // DNS transaction timed out.
810 NET_ERROR(DNS_TIMED_OUT
, -803)
812 // The entry was not found in cache, for cache-only lookups.
813 NET_ERROR(DNS_CACHE_MISS
, -804)
815 // Suffix search list rules prevent resolution of the given host name.
816 NET_ERROR(DNS_SEARCH_EMPTY
, -805)
818 // Failed to sort addresses according to RFC3484.
819 NET_ERROR(DNS_SORT_ERROR
, -806)