in Source/TNLError.h [71:206]
typedef NS_ERROR_ENUM(TNLErrorDomain, TNLErrorCode) {
/** Unknown error */
TNLErrorCodeUnknown = 0,
// Request Error Codes
/** Generic `TNLRequest` error */
TNLErrorCodeRequestGenericError = 100,
/** Invalid `TNLRequest` */
TNLErrorCodeRequestInvalid = 101,
/** Invalid URL on a `TNLRequest` */
TNLErrorCodeRequestInvalidURL = 102,
/** Invalid HTTP Method on a `TNLRequest` */
TNLErrorCodeRequestInvalidHTTPMethod = 103,
/**
When the execution mode is `TNLResponseDataConsumptionModeSaveToDisk`, the HTTP Body must not
be set. This is because simultaneous uploading a body and downloading a file is not supported.
*/
TNLErrorCodeRequestHTTPBodyCannotBeSetForDownload = 104,
/**
Background requests must either upload data (via file) or download data (to a file).
For upload, set an HTTP Body (with `HTTPBodyFilePath`).
For download, set the execution mode to `TNLResponseDataConsumptionModeSaveToDisk`.
NOTE: background uploading a body without a file (`HTTPBody` or `HTTPBodyStream`) is also
invalid and will yield this error. The _NSURLSession_ docs are incorrect, which falsely state that any `NSURLSessionUploadTask` will work on a background session.
*/
TNLErrorCodeRequestInvalidBackgroundRequest = 105,
// Request Operation Error Codes
/** Generic `TNLRequestOperation` error */
TNLErrorCodeRequestOperationGenericError = 200,
/**
The request operation was cancelled.
The `NSError` object's `userInfo` will contain a `TNLErrorCancelSourceKey` KVP, a
`TNLErrorCancelSourceDescriptionKey` KVP, (optionally) a
`TNLErrorCancelSourceLocalizedDescriptionKey` and (optionally) an `NSUnderlyingErrorKey` KVP.
See `[TNLRequestOperation cancelWithSource:underlyingError:]` and
`[TNLRequestOperationQueue cancelAllWithSource:underlyingError:]`.
*/
TNLErrorCodeRequestOperationCancelled = 201,
/** The request operation timed out. See `[TNLRequestConfiguration operationTimeout]`. */
TNLErrorCodeRequestOperationOperationTimedOut = 202,
/** The request attempt timed out. See `[TNLRequestConfiguration attemptTimeout]`. */
TNLErrorCodeRequestOperationAttemptTimedOut = 203,
/** The request timed out due to idleness. See `[TNLRequestConfiguration idleTimeout]`. */
TNLErrorCodeRequestOperationIdleTimedOut = 204,
/** The request times out due to a delegate/retry-policy callback taking too long (10 seconds). */
TNLErrorCodeRequestOperationCallbackTimedOut = 205,
/** The request operation was not provided an object that conforms to the `TNLRequest` protocol. */
TNLErrorCodeRequestOperationRequestNotProvided = 206,
/** The `TNLRequest` could not be hydrated. The `NSUnderlyingError` key will be set. */
TNLErrorCodeRequestOperationFailedToHydrateRequest = 207,
/**
The hydrated `TNLRequest` is not valid.
The `NSUnderlyingError` will be set - usually a `TNLErrorCodeRequestBLAH` error.
*/
TNLErrorCodeRequestOperationInvalidHydratedRequest = 208,
/** There was an I/O error */
TNLErrorCodeRequestOperationFileIOError = 209,
/** There was an issue appending received data to memory */
TNLErrorCodeRequestOperationAppendResponseDataError = 210,
/**
The underlying NSURLSession became invalid.
If the invalidation is systemic, the `NSUnderlyingError` will be set.
*/
TNLErrorCodeRequestOperationURLSessionInvalidated = 211,
/** Authentication challenge was cancelled */
TNLErrorCodeRequestOperationAuthenticationChallengeCancelled = 212,
/**
The request's `"Content-Encoding"` HTTP field was specified and it did not match the specified
`TNLContentEncoder` on the `TNLRequestConfiguration`
*/
TNLErrorCodeRequestOperationRequestContentEncodingTypeMissMatch = 213,
/**
The request's body failed to be encoded with the specified `TNLContentEncoder` on the
`TNLRequestConfiguration`
*/
TNLErrorCodeRequestOperationRequestContentEncodingFailed = 214,
/**
The response's body failed to be decoded with the matching `TNLContentDecoder` specified by
`TNLRequestConfiguration`
*/
TNLErrorCodeRequestOperationRequestContentDecodingFailed = 215,
/** The operation could not authorize its request. */
TNLErrorCodeRequestOperationFailedToAuthorizeRequest = 216,
// Global Error Codes
/** Generic global error */
TNLErrorCodeGlobalGenericError = 300,
/**
The URL host was blocked by the `TNLGlobalConfiguration`'s `TNLHostSanitizer`.
`TNLErrorHostKey` will be set.
*/
TNLErrorCodeGlobalHostWasBlocked = 301,
// Other Error Codes
/** Generic other error */
TNLErrorCodeOtherGenericError = 9900,
/** The URL host was empty */
TNLErrorCodeOtherHostCannotBeEmpty = 9901,
};