Skip to content
Browse files

Return better error when RESTOperation fails auth

If using RESTOperation to talk to a remote server (not TouchDB), if no credential can be found for an auth challenge
it should call -continueWithoutCredentialForAuthenticationChallenge: instead of cancelAuthenticationChallenge:.
This will ensure that the error seen by the client is an HTTP 401 instead of "NSURLErrorDomain error -1012".
  • Loading branch information...
1 parent 8029919 commit fc56cc0385209e4bfd2f6dce8d8339bca88c636f @snej snej committed Jan 24, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 REST/RESTOperation.m
View
2 REST/RESTOperation.m
@@ -514,7 +514,7 @@ - (void)connection:(NSURLConnection *)connection
}
}
// give up
- [challenge.sender cancelAuthenticationChallenge: challenge];
+ [challenge.sender continueWithoutCredentialForAuthenticationChallenge: challenge];
}

0 comments on commit fc56cc0

Please sign in to comment.
Something went wrong with that request. Please try again.