Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Domain=com.alamofire.error Code=-999 #128

Closed
ivasic opened this issue Jun 29, 2016 · 1 comment
Closed

Error Domain=com.alamofire.error Code=-999 #128

ivasic opened this issue Jun 29, 2016 · 1 comment
Assignees
Milestone

Comments

@ivasic
Copy link

ivasic commented Jun 29, 2016

When cancelling an image download (e.g. loading another image in an UIImageView while the previous request is still running), AlamofireImage executes the completion block with .Failure(error) like so:

Error Domain=com.alamofire.error Code=-999 "ImageDownloader cancelled URL request: https://mywebsite/image.jpg" UserInfo={NSLocalizedFailureReason=ImageDownloader cancelled URL request: https://mywebsite/image.jpg}

Now this looks good but the error domain is set to alamofire (com.alamofire.error) and code -999 is not defined in this error domain but it seems that it is actually coming from NSURLErrorDomain and that would be code NSURLErrorCancelled. Shouldn't the domain really be NSURLErrorDomain rather than com.alamofire.error?

@cnoon
Copy link
Member

cnoon commented Aug 22, 2016

Thanks for reporting this @ivasic. You are completely right. The domain has been fixed in b2eb100.

Cheers. 🍻

@cnoon cnoon closed this as completed Aug 22, 2016
@cnoon cnoon added this to the 2.4.2 milestone Aug 22, 2016
@cnoon cnoon self-assigned this Aug 22, 2016
@cnoon cnoon modified the milestones: 2.5.0, 2.4.2 Sep 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants