| Home | Parent | ← Go → | Prior | Next |
The response from a website to a request for a bookmark’s URL normally contains an HTTP Status Code, which is usually a positive integer between 100 and 599, although some creative cowboy webmasters sometimes return their own made-up status codes, usually in the range 600 to 999.
However, “lower level” errors can occur if the site does not send an HTTP response. These lower level errors are returned to BookMacster by Mac OS X and contain “error codes” in Apple’s NSURLErrorDomain. The codes in NSURLErrorDomain are negative numbers.
Fortunately (maybe because Apple planned it this way), there is no overlap between these positive and negative values. Therefore, BookMacster stores in its Verify results for a bookmark what we call a Verify Status Code. Quite simply, if this value is positive, it’s an HTTP Status Code, and if negative, it’s an error code in the NSURLErrorDomain.
Most of the HTTP status codes you will see are defined in Section 10 of Internet Society’s specification HTTP/1.1. But although it was published in 1999, this document still has not been ratified into a standard, and in the meantime additional codes have been proposed. For a readable and more complete table of the HTTP status codes in use at this time, we recommend this Wikipedia article.
The following is derived from the file NSURLErrorDomain.h, but we’ve published them here since you will not have that file unless you have installed Apple’s Developer Tools, and also we added the narrative descriptions.
| Code | NSURLError: | Means that connection failed because: |
| -999 | Cancelled | it was cancelled. |
| -1000 | BadURL | it has a bad URL. |
| -1001 | TimedOut | it took longer than the timeout which was alotted. |
| -1002 | UnsupportedURL | it has an unsupported URL. |
| -1003 | CannotFindHost | the host could not be found. |
| -1004 | CannotConnectToHost | the host would not let us establish a connection. |
| -1005 | NetworkConnectionLost | we established a connection but it was lost. |
| -1006 | DNSLookupFailed | domain name server (DNS) lookup failed. |
| -1007 | HTTPTooManyRedirects | we received too many redirects from the server while processing the request. |
| -1008 | ResourceUnavailable | the requested resource is not available. |
| -1009 | NotConnectedToInternet | this computer appears to not have an internet connection. |
| -1010 | RedirectToNonExistentLocation | we were redirected to a nonexistent location. |
| -1011 | BadServerResponse | we got a bad response from the server. |
| -1012 | UserCancelledAuthentication | the user cancelled when asked for authentication. |
| -1013 | UserAuthenticationRequired | user authentication is required. |
| -1014 | ZeroByteResource | the requested resource contains no data. |
| -1015 | CannotDecodeRawData | we could not decode the raw data. |
| -1016 | CannotDecodeContentData | we could not decode the content. |
| -1017 | CannotParseResponse | we could not parse the response. |
| -1100 | FileDoesNotExist | the requested file does not exist. |
| -1101 | FileIsDirectory | the requested file is in fact a directory. |
| -1102 | NoPermissionsToReadFile | we lack sufficient permissions to read the requested file. |
| -1103 | DataLengthExceedsMaximum | the length of the requested data exceeds the limit. |
| -1200 | SecureConnectionFailed | we could not establish a secure connection. |
| -1201 | ServerCertificateHasBadDate | the server’s SSL certificate appears to have expired. |
| -1202 | ServerCertificateUntrusted | the server’s SSL certificate is not trusted. |
| -1203 | ServerCertificateHasUnknownRoot | the server’s SSL certificate has an unknown root. |
| -1204 | ServerCertificateNotYetValid | the server’s SSL certificate is not yet valid. |
| -1205 | ClientCertificateRejected | the server rejected our client certificate. |
| -2000 | CannotLoadFromNetwork | we could not load from the network. |
| -3000 | CannotCreateFile | we could not create a file. |
| -3001 | CannotOpenFile | we could not open a file. |
| -3002 | CannotCloseFile | we could not close a file. |
| -3003 | CannotWriteToFile | we could not write to a file. |
| -3004 | CannotRemoveFile | we could not remove a file. |
| -3005 | CannotMoveFile | we could not move a file. |
| -3006 | DownloadDecodingFailedMidStream | decoding the downloaded data failed in midstream. |
| -3007 | DownloadDecodingFailedToComplete | decoding the downloaded data failed to complete. |
| Home | Parent | ← Go → | Prior | Next |