Biranchi
Biranchi

Reputation: 16317

NSURLConnection Error

What is "Error Domain=NSURLErrorDomain Code=-1020 UserInfo=0x1694a0 "Operation could not be completed. (NSURLErrorDomain error -1020.)"" due to ??

Upvotes: 5

Views: 8270

Answers (4)

Artem Artem
Artem Artem

Reputation: 151

To see CFNetworkErrors, go to CFNetwork.CFNetworkErrors

CFNetworkErrors.cfurlErrorDataNotAllowed.rawValue (Int32 value = -1020)

case cfurlErrorBadURL = -1000
case cfurlErrorTimedOut = -1001
case cfurlErrorUnsupportedURL = -1002
case cfurlErrorCannotFindHost = -1003
case cfurlErrorCannotConnectToHost = -1004
case cfurlErrorNetworkConnectionLost = -1005
case cfurlErrorDNSLookupFailed = -1006
case cfurlErrorHTTPTooManyRedirects = -1007
case cfurlErrorResourceUnavailable = -1008
case cfurlErrorNotConnectedToInternet = -1009
case cfurlErrorRedirectToNonExistentLocation = -1010
case cfurlErrorBadServerResponse = -1011
case cfurlErrorUserCancelledAuthentication = -1012
case cfurlErrorUserAuthenticationRequired = -1013
case cfurlErrorZeroByteResource = -1014
case cfurlErrorCannotDecodeRawData = -1015
case cfurlErrorCannotDecodeContentData = -1016
case cfurlErrorCannotParseResponse = -1017
case cfurlErrorInternationalRoamingOff = -1018
case cfurlErrorCallIsActive = -1019
case cfurlErrorDataNotAllowed = -1020
case cfurlErrorRequestBodyStreamExhausted = -1021
case cfurlErrorAppTransportSecurityRequiresSecureConnection = -1022
case cfurlErrorFileDoesNotExist = -1100
case cfurlErrorFileIsDirectory = -1101
case cfurlErrorNoPermissionsToReadFile = -1102
case cfurlErrorDataLengthExceedsMaximum = -1103
case cfurlErrorFileOutsideSafeArea = -1104

Upvotes: 1

Quinn Taylor
Quinn Taylor

Reputation: 44769

The error codes you get from NSURLConnection are in NSURLError.h and CFNetworkErrors.h, as well as this Apple documentation. It looks like -1020 is kCFURLErrorDataNotAllowed, which says:

"The connection failed because data use is currently not allowed on the device."

Upvotes: 5

vodkhang
vodkhang

Reputation: 18741

Surprisingly, I can not see the error code -1020 there.:(.

typedef enum
{

   NSURLErrorBadServerResponse = -1011,

   NSURLErrorUserCancelledAuthentication = -1012,

   NSURLErrorUserAuthenticationRequired = -1013,

   NSURLErrorZeroByteResource = -1014,

   NSURLErrorCannotDecodeRawData = -1015,

   NSURLErrorCannotDecodeContentData = -1016,

   NSURLErrorCannotParseResponse = -1017,
}

I believe that this one is a right table right?

Upvotes: -2

Mihir Mehta
Mihir Mehta

Reputation: 13833

It can not decode the data......

Upvotes: 0

Related Questions