AFNetworking: How to access localized description from instance of NSError in AFHTTPRequestOperation

569 Views Asked by At

I am facing weird problems with (NSError*)error object from AFHTTPRequestOperation. I am using following method to simply access the userInfo but it's returning nil.

NSDictionary *infoDict = [error userInfo]; // assigning nil

However, while debugging I can see the error object with userInfo dictionary. Moreover I am accessing the status code as it should be.

code = [[[error userInfo] objectForKey:AFNetworkingOperationFailingURLResponseErrorKey] statusCode];

Edit 1:

0

There are 0 best solutions below