1 // Copyright (c) 2011 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.
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 // A connection was closed (corresponding to a TCP FIN).
88 NET_ERROR(CONNECTION_CLOSED
, -100)
90 // A connection was reset (corresponding to a TCP RST).
91 NET_ERROR(CONNECTION_RESET
, -101)
93 // A connection attempt was refused.
94 NET_ERROR(CONNECTION_REFUSED
, -102)
96 // A connection timed out as a result of not receiving an ACK for data sent.
97 // This can include a FIN packet that did not get ACK'd.
98 NET_ERROR(CONNECTION_ABORTED
, -103)
100 // A connection attempt failed.
101 NET_ERROR(CONNECTION_FAILED
, -104)
103 // The host name could not be resolved.
104 NET_ERROR(NAME_NOT_RESOLVED
, -105)
106 // The Internet connection has been lost.
107 NET_ERROR(INTERNET_DISCONNECTED
, -106)
109 // An SSL protocol error occurred.
110 NET_ERROR(SSL_PROTOCOL_ERROR
, -107)
112 // The IP address or port number is invalid (e.g., cannot connect to the IP
113 // address 0 or the port 0).
114 NET_ERROR(ADDRESS_INVALID
, -108)
116 // The IP address is unreachable. This usually means that there is no route to
117 // the specified host or network.
118 NET_ERROR(ADDRESS_UNREACHABLE
, -109)
120 // The server requested a client certificate for SSL client authentication.
121 NET_ERROR(SSL_CLIENT_AUTH_CERT_NEEDED
, -110)
123 // A tunnel connection through the proxy could not be established.
124 NET_ERROR(TUNNEL_CONNECTION_FAILED
, -111)
126 // No SSL protocol versions are enabled.
127 NET_ERROR(NO_SSL_VERSIONS_ENABLED
, -112)
129 // The client and server don't support a common SSL protocol version or
131 NET_ERROR(SSL_VERSION_OR_CIPHER_MISMATCH
, -113)
133 // The server requested a renegotiation (rehandshake).
134 NET_ERROR(SSL_RENEGOTIATION_REQUESTED
, -114)
136 // The proxy requested authentication (for tunnel establishment) with an
137 // unsupported method.
138 NET_ERROR(PROXY_AUTH_UNSUPPORTED
, -115)
140 // During SSL renegotiation (rehandshake), the server sent a certificate with
143 // Note: this error is not in the -2xx range so that it won't be handled as a
144 // certificate error.
145 NET_ERROR(CERT_ERROR_IN_SSL_RENEGOTIATION
, -116)
147 // The SSL handshake failed because of a bad or missing client certificate.
148 NET_ERROR(BAD_SSL_CLIENT_AUTH_CERT
, -117)
150 // A connection attempt timed out.
151 NET_ERROR(CONNECTION_TIMED_OUT
, -118)
153 // There are too many pending DNS resolves, so a request in the queue was
155 NET_ERROR(HOST_RESOLVER_QUEUE_TOO_LARGE
, -119)
157 // Failed establishing a connection to the SOCKS proxy server for a target host.
158 NET_ERROR(SOCKS_CONNECTION_FAILED
, -120)
160 // The SOCKS proxy server failed establishing connection to the target host
161 // because that host is unreachable.
162 NET_ERROR(SOCKS_CONNECTION_HOST_UNREACHABLE
, -121)
164 // The request to negotiate an alternate protocol failed.
165 NET_ERROR(NPN_NEGOTIATION_FAILED
, -122)
167 // The peer sent an SSL no_renegotiation alert message.
168 NET_ERROR(SSL_NO_RENEGOTIATION
, -123)
170 // Winsock sometimes reports more data written than passed. This is probably
171 // due to a broken LSP.
172 NET_ERROR(WINSOCK_UNEXPECTED_WRITTEN_BYTES
, -124)
174 // An SSL peer sent us a fatal decompression_failure alert. This typically
175 // occurs when a peer selects DEFLATE compression in the mistaken belief that
177 NET_ERROR(SSL_DECOMPRESSION_FAILURE_ALERT
, -125)
179 // An SSL peer sent us a fatal bad_record_mac alert. This has been observed
180 // from servers with buggy DEFLATE support.
181 NET_ERROR(SSL_BAD_RECORD_MAC_ALERT
, -126)
183 // The proxy requested authentication (for tunnel establishment).
184 NET_ERROR(PROXY_AUTH_REQUESTED
, -127)
186 // A known TLS strict server didn't offer the renegotiation extension.
187 NET_ERROR(SSL_UNSAFE_NEGOTIATION
, -128)
189 // The SSL server attempted to use a weak ephemeral Diffie-Hellman key.
190 NET_ERROR(SSL_WEAK_SERVER_EPHEMERAL_DH_KEY
, -129)
192 // Could not create a connection to the proxy server. An error occurred
193 // either in resolving its name, or in connecting a socket to it.
194 // Note that this does NOT include failures during the actual "CONNECT" method
196 NET_ERROR(PROXY_CONNECTION_FAILED
, -130)
198 // A mandatory proxy configuration could not be used. Currently this means
199 // that a mandatory PAC script could not be fetched, parsed or executed.
200 NET_ERROR(MANDATORY_PROXY_CONFIGURATION_FAILED
, -131)
202 // We detected an ESET product intercepting our HTTPS connections. Since these
203 // products are False Start intolerant, we return this error so that we can
204 // give the user a helpful error message rather than have the connection hang.
205 // See also: KASPERSKY_ANTI_VIRUS_SSL_INTERCEPTION
206 NET_ERROR(ESET_ANTI_VIRUS_SSL_INTERCEPTION
, -132)
208 // We've hit the max socket limit for the socket pool while preconnecting. We
209 // don't bother trying to preconnect more sockets.
210 NET_ERROR(PRECONNECT_MAX_SOCKET_LIMIT
, -133)
212 // The permission to use the SSL client certificate's private key was denied.
213 NET_ERROR(SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED
, -134)
215 // The SSL client certificate has no private key.
216 NET_ERROR(SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY
, -135)
218 // The certificate presented by the HTTPS Proxy was invalid.
219 NET_ERROR(PROXY_CERTIFICATE_INVALID
, -136)
221 // An error occurred when trying to do a name resolution (DNS).
222 NET_ERROR(NAME_RESOLUTION_FAILED
, -137)
224 // Permission to access the network was denied. This is used to distinguish
225 // errors that were most likely caused by a firewall from other access denied
226 // errors. See also ERR_ACCESS_DENIED.
227 NET_ERROR(NETWORK_ACCESS_DENIED
, -138)
229 // The request throttler module cancelled this request to avoid DDOS.
230 NET_ERROR(TEMPORARILY_THROTTLED
, -139)
232 // A request to create an SSL tunnel connection through the HTTPS proxy
233 // received a non-200 (OK) and non-407 (Proxy Auth) response. The response
234 // body might include a description of why the request failed.
235 NET_ERROR(HTTPS_PROXY_TUNNEL_RESPONSE
, -140)
237 // We were unable to sign the CertificateVerify data of an SSL client auth
238 // handshake with the client certificate's private key.
240 // Possible causes for this include the user implicitly or explicitly
241 // denying access to the private key, the private key may not be valid for
242 // signing, the key may be relying on a cached handle which is no longer
243 // valid, or the CSP won't allow arbitrary data to be signed.
244 NET_ERROR(SSL_CLIENT_AUTH_SIGNATURE_FAILED
, -141)
246 // The message was too large for the transport. (for example a UDP message
247 // which exceeds size threshold).
248 NET_ERROR(MSG_TOO_BIG
, -142)
250 // We detected a Kaspersky product intercepting our HTTPS connections. This
251 // interacts badly with our SSL stack for unknown reasons (disabling False
252 // Start doesn't help). We return this error so that we can give the user a
253 // helpful error message rather than have the connection hang.
254 // See also: ESET_ANTI_VIRUS_SSL_INTERCEPTION
255 NET_ERROR(KASPERSKY_ANTI_VIRUS_SSL_INTERCEPTION
, -143)
257 // Violation of limits (e.g. imposed to prevent DoS).
258 NET_ERROR(LIMIT_VIOLATION
, -144)
260 // WebSocket protocol error occurred.
261 NET_ERROR(WS_PROTOCOL_ERROR
, -145)
263 // Connection was aborted for switching to another ptotocol.
264 // WebSocket abort SocketStream connection when alternate protocol is found.
265 NET_ERROR(PROTOCOL_SWITCHED
, -146)
267 // Returned when attempting to bind an address that is already in use.
268 NET_ERROR(ADDRESS_IN_USE
, -147)
270 // An operation failed because the SSL handshake has not completed.
271 NET_ERROR(SSL_HANDSHAKE_NOT_COMPLETED
, -148)
273 // SSL peer's public key is invalid.
274 NET_ERROR(SSL_BAD_PEER_PUBLIC_KEY
, -149)
276 // The certificate didn't match the built-in public key pins for the host name.
277 // The pins are set in net/base/transport_security_state.cc and require that
278 // one of a set of public keys exist on the path from the leaf to the root.
279 NET_ERROR(SSL_PINNED_KEY_NOT_IN_CERT_CHAIN
, -150)
281 // Server request for client certificate did not contain any types we support.
282 NET_ERROR(CLIENT_AUTH_CERT_TYPE_UNSUPPORTED
, -151)
284 // Server requested one type of cert, then requested a different type while the
285 // first was still being generated.
286 NET_ERROR(ORIGIN_BOUND_CERT_GENERATION_TYPE_MISMATCH
, -152)
288 // Certificate error codes
290 // The values of certificate error codes must be consecutive.
292 // The server responded with a certificate whose common name did not match
293 // the host name. This could mean:
295 // 1. An attacker has redirected our traffic to his server and is
296 // presenting a certificate for which he knows the private key.
298 // 2. The server is misconfigured and responding with the wrong cert.
300 // 3. The user is on a wireless network and is being redirected to the
301 // network's login page.
303 // 4. The OS has used a DNS search suffix and the server doesn't have
304 // a certificate for the abbreviated name in the address bar.
306 NET_ERROR(CERT_COMMON_NAME_INVALID
, -200)
308 // The server responded with a certificate that, by our clock, appears to
309 // either not yet be valid or to have expired. This could mean:
311 // 1. An attacker is presenting an old certificate for which he has
312 // managed to obtain the private key.
314 // 2. The server is misconfigured and is not presenting a valid cert.
316 // 3. Our clock is wrong.
318 NET_ERROR(CERT_DATE_INVALID
, -201)
320 // The server responded with a certificate that is signed by an authority
321 // we don't trust. The could mean:
323 // 1. An attacker has substituted the real certificate for a cert that
324 // contains his public key and is signed by his cousin.
326 // 2. The server operator has a legitimate certificate from a CA we don't
327 // know about, but should trust.
329 // 3. The server is presenting a self-signed certificate, providing no
330 // defense against active attackers (but foiling passive attackers).
332 NET_ERROR(CERT_AUTHORITY_INVALID
, -202)
334 // The server responded with a certificate that contains errors.
335 // This error is not recoverable.
337 // MSDN describes this error as follows:
338 // "The SSL certificate contains errors."
339 // NOTE: It's unclear how this differs from ERR_CERT_INVALID. For consistency,
340 // use that code instead of this one from now on.
342 NET_ERROR(CERT_CONTAINS_ERRORS
, -203)
344 // The certificate has no mechanism for determining if it is revoked. In
345 // effect, this certificate cannot be revoked.
346 NET_ERROR(CERT_NO_REVOCATION_MECHANISM
, -204)
348 // Revocation information for the security certificate for this site is not
349 // available. This could mean:
351 // 1. An attacker has compromised the private key in the certificate and is
352 // blocking our attempt to find out that the cert was revoked.
354 // 2. The certificate is unrevoked, but the revocation server is busy or
357 NET_ERROR(CERT_UNABLE_TO_CHECK_REVOCATION
, -205)
359 // The server responded with a certificate has been revoked.
360 // We have the capability to ignore this error, but it is probably not the
362 NET_ERROR(CERT_REVOKED
, -206)
364 // The server responded with a certificate that is invalid.
365 // This error is not recoverable.
367 // MSDN describes this error as follows:
368 // "The SSL certificate is invalid."
370 NET_ERROR(CERT_INVALID
, -207)
372 // The server responded with a certificate that is signed using a weak
373 // signature algorithm.
374 NET_ERROR(CERT_WEAK_SIGNATURE_ALGORITHM
, -208)
376 // The domain has CERT records which are tagged as being an exclusive list of
377 // valid fingerprints. But the certificate presented was not in this list.
378 NET_ERROR(CERT_NOT_IN_DNS
, -209)
380 // The host name specified in the certificate is not unique.
381 NET_ERROR(CERT_NON_UNIQUE_NAME
, -210)
383 // The server responded with a certificate that contains a weak key (e.g.
384 // a too-small RSA key).
385 NET_ERROR(CERT_WEAK_KEY
, -211)
387 // Add new certificate error codes here.
389 // Update the value of CERT_END whenever you add a new certificate error
392 // The value immediately past the last certificate error code.
393 NET_ERROR(CERT_END
, -212)
395 // The URL is invalid.
396 NET_ERROR(INVALID_URL
, -300)
398 // The scheme of the URL is disallowed.
399 NET_ERROR(DISALLOWED_URL_SCHEME
, -301)
401 // The scheme of the URL is unknown.
402 NET_ERROR(UNKNOWN_URL_SCHEME
, -302)
404 // Attempting to load an URL resulted in too many redirects.
405 NET_ERROR(TOO_MANY_REDIRECTS
, -310)
407 // Attempting to load an URL resulted in an unsafe redirect (e.g., a redirect
408 // to file:// is considered unsafe).
409 NET_ERROR(UNSAFE_REDIRECT
, -311)
411 // Attempting to load an URL with an unsafe port number. These are port
412 // numbers that correspond to services, which are not robust to spurious input
413 // that may be constructed as a result of an allowed web construct (e.g., HTTP
414 // looks a lot like SMTP, so form submission to port 25 is denied).
415 NET_ERROR(UNSAFE_PORT
, -312)
417 // The server's response was invalid.
418 NET_ERROR(INVALID_RESPONSE
, -320)
420 // Error in chunked transfer encoding.
421 NET_ERROR(INVALID_CHUNKED_ENCODING
, -321)
423 // The server did not support the request method.
424 NET_ERROR(METHOD_NOT_SUPPORTED
, -322)
426 // The response was 407 (Proxy Authentication Required), yet we did not send
427 // the request to a proxy.
428 NET_ERROR(UNEXPECTED_PROXY_AUTH
, -323)
430 // The server closed the connection without sending any data.
431 NET_ERROR(EMPTY_RESPONSE
, -324)
433 // The headers section of the response is too large.
434 NET_ERROR(RESPONSE_HEADERS_TOO_BIG
, -325)
436 // The PAC requested by HTTP did not have a valid status code (non-200).
437 NET_ERROR(PAC_STATUS_NOT_OK
, -326)
439 // The evaluation of the PAC script failed.
440 NET_ERROR(PAC_SCRIPT_FAILED
, -327)
442 // The response was 416 (Requested range not satisfiable) and the server cannot
443 // satisfy the range requested.
444 NET_ERROR(REQUEST_RANGE_NOT_SATISFIABLE
, -328)
446 // The identity used for authentication is invalid.
447 NET_ERROR(MALFORMED_IDENTITY
, -329)
449 // Content decoding of the response body failed.
450 NET_ERROR(CONTENT_DECODING_FAILED
, -330)
452 // An operation could not be completed because all network IO
454 NET_ERROR(NETWORK_IO_SUSPENDED
, -331)
456 // FLIP data received without receiving a SYN_REPLY on the stream.
457 NET_ERROR(SYN_REPLY_NOT_RECEIVED
, -332)
459 // Converting the response to target encoding failed.
460 NET_ERROR(ENCODING_CONVERSION_FAILED
, -333)
462 // The server sent an FTP directory listing in a format we do not understand.
463 NET_ERROR(UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT
, -334)
465 // Attempted use of an unknown SPDY stream id.
466 NET_ERROR(INVALID_SPDY_STREAM
, -335)
468 // There are no supported proxies in the provided list.
469 NET_ERROR(NO_SUPPORTED_PROXIES
, -336)
471 // There is a SPDY protocol framing error.
472 NET_ERROR(SPDY_PROTOCOL_ERROR
, -337)
474 // Credentials could not be established during HTTP Authentication.
475 NET_ERROR(INVALID_AUTH_CREDENTIALS
, -338)
477 // An HTTP Authentication scheme was tried which is not supported on this
479 NET_ERROR(UNSUPPORTED_AUTH_SCHEME
, -339)
481 // Detecting the encoding of the response failed.
482 NET_ERROR(ENCODING_DETECTION_FAILED
, -340)
484 // (GSSAPI) No Kerberos credentials were available during HTTP Authentication.
485 NET_ERROR(MISSING_AUTH_CREDENTIALS
, -341)
487 // An unexpected, but documented, SSPI or GSSAPI status code was returned.
488 NET_ERROR(UNEXPECTED_SECURITY_LIBRARY_STATUS
, -342)
490 // The environment was not set up correctly for authentication (for
491 // example, no KDC could be found or the principal is unknown.
492 NET_ERROR(MISCONFIGURED_AUTH_ENVIRONMENT
, -343)
494 // An undocumented SSPI or GSSAPI status code was returned.
495 NET_ERROR(UNDOCUMENTED_SECURITY_LIBRARY_STATUS
, -344)
497 // The HTTP response was too big to drain.
498 NET_ERROR(RESPONSE_BODY_TOO_BIG_TO_DRAIN
, -345)
500 // The HTTP response contained multiple distinct Content-Length headers.
501 NET_ERROR(RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH
, -346)
503 // SPDY Headers have been received, but not all of them - status or version
504 // headers are missing, so we're expecting additional frames to complete them.
505 NET_ERROR(INCOMPLETE_SPDY_HEADERS
, -347)
507 // No PAC URL configuration could be retrieved from DHCP. This can indicate
508 // either a failure to retrieve the DHCP configuration, or that there was no
509 // PAC URL configured in DHCP.
510 NET_ERROR(PAC_NOT_IN_DHCP
, -348)
512 // The HTTP response contained multiple Content-Disposition headers.
513 NET_ERROR(RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION
, -349)
515 // The HTTP response contained multiple Location headers.
516 NET_ERROR(RESPONSE_HEADERS_MULTIPLE_LOCATION
, -350)
518 // SPDY server refused the stream. Client should retry. This should never be a
519 // user-visible error.
520 NET_ERROR(SPDY_SERVER_REFUSED_STREAM
, -351)
522 // SPDY server didn't respond to the PING message.
523 NET_ERROR(SPDY_PING_FAILED
, -352)
525 // The cache does not have the requested entry.
526 NET_ERROR(CACHE_MISS
, -400)
528 // Unable to read from the disk cache.
529 NET_ERROR(CACHE_READ_FAILURE
, -401)
531 // Unable to write to the disk cache.
532 NET_ERROR(CACHE_WRITE_FAILURE
, -402)
534 // The operation is not supported for this entry.
535 NET_ERROR(CACHE_OPERATION_NOT_SUPPORTED
, -403)
537 // The disk cache is unable to open this entry.
538 NET_ERROR(CACHE_OPEN_FAILURE
, -404)
540 // The disk cache is unable to create this entry.
541 NET_ERROR(CACHE_CREATE_FAILURE
, -405)
543 // Multiple transactions are racing to create disk cache entries. This is an
544 // internal error returned from the HttpCache to the HttpCacheTransaction that
545 // tells the transaction to restart the entry-creation logic because the state
546 // of the cache has changed.
547 NET_ERROR(CACHE_RACE
, -406)
549 // The server's response was insecure (e.g. there was a cert error).
550 NET_ERROR(INSECURE_RESPONSE
, -501)
552 // The server responded to a <keygen> with a generated client cert that we
553 // don't have the matching private key for.
554 NET_ERROR(NO_PRIVATE_KEY_FOR_CERT
, -502)
556 // An error adding to the OS certificate database (e.g. OS X Keychain).
557 NET_ERROR(ADD_USER_CERT_FAILED
, -503)
559 // *** Code -600 is reserved (was FTP_PASV_COMMAND_FAILED). ***
561 // A generic error for failed FTP control connection command.
562 // If possible, please use or add a more specific error code.
563 NET_ERROR(FTP_FAILED
, -601)
565 // The server cannot fulfill the request at this point. This is a temporary
567 // FTP response code 421.
568 NET_ERROR(FTP_SERVICE_UNAVAILABLE
, -602)
570 // The server has aborted the transfer.
571 // FTP response code 426.
572 NET_ERROR(FTP_TRANSFER_ABORTED
, -603)
574 // The file is busy, or some other temporary error condition on opening
576 // FTP response code 450.
577 NET_ERROR(FTP_FILE_BUSY
, -604)
579 // Server rejected our command because of syntax errors.
580 // FTP response codes 500, 501.
581 NET_ERROR(FTP_SYNTAX_ERROR
, -605)
583 // Server does not support the command we issued.
584 // FTP response codes 502, 504.
585 NET_ERROR(FTP_COMMAND_NOT_SUPPORTED
, -606)
587 // Server rejected our command because we didn't issue the commands in right
589 // FTP response code 503.
590 NET_ERROR(FTP_BAD_COMMAND_SEQUENCE
, -607)
592 // PKCS #12 import failed due to incorrect password.
593 NET_ERROR(PKCS12_IMPORT_BAD_PASSWORD
, -701)
595 // PKCS #12 import failed due to other error.
596 NET_ERROR(PKCS12_IMPORT_FAILED
, -702)
598 // CA import failed - not a CA cert.
599 NET_ERROR(IMPORT_CA_CERT_NOT_CA
, -703)
601 // Import failed - certificate already exists in database.
602 // Note it's a little weird this is an error but reimporting a PKCS12 is ok
603 // (no-op). That's how Mozilla does it, though.
604 NET_ERROR(IMPORT_CERT_ALREADY_EXISTS
, -704)
606 // CA import failed due to some other error.
607 NET_ERROR(IMPORT_CA_CERT_FAILED
, -705)
609 // Server certificate import failed due to some internal error.
610 NET_ERROR(IMPORT_SERVER_CERT_FAILED
, -706)
612 // PKCS #12 import failed due to invalid MAC.
613 NET_ERROR(PKCS12_IMPORT_INVALID_MAC
, -707)
615 // PKCS #12 import failed due to invalid/corrupt file.
616 NET_ERROR(PKCS12_IMPORT_INVALID_FILE
, -708)
618 // PKCS #12 import failed due to unsupported features.
619 NET_ERROR(PKCS12_IMPORT_UNSUPPORTED
, -709)
621 // Key generation failed.
622 NET_ERROR(KEY_GENERATION_FAILED
, -710)
624 // Origin-bound certificate generation failed.
625 NET_ERROR(ORIGIN_BOUND_CERT_GENERATION_FAILED
, -711)
627 // Failure to export private key.
628 NET_ERROR(PRIVATE_KEY_EXPORT_FAILED
, -712)
632 // DNS resolver received a malformed response.
633 NET_ERROR(DNS_MALFORMED_RESPONSE
, -800)
635 // DNS server requires TCP
636 NET_ERROR(DNS_SERVER_REQUIRES_TCP
, -801)
638 // DNS server failed. This error is returned for all of the following
640 // 1 - Format error - The name server was unable to interpret the query.
641 // 2 - Server failure - The name server was unable to process this query
642 // due to a problem with the name server.
643 // 4 - Not Implemented - The name server does not support the requested
645 // 5 - Refused - The name server refuses to perform the specified
646 // operation for policy reasons.
647 NET_ERROR(DNS_SERVER_FAILED
, -802)
649 // DNS transaction timed out.
650 NET_ERROR(DNS_TIMED_OUT
, -803)
652 // The entry was not found in cache, for cache-only lookups.
653 NET_ERROR(DNS_CACHE_MISS
, -804)
655 // FIXME: Take the next number.
656 NET_ERROR(PIPELINE_EVICTION
, -900)