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

Auth errors not getting bubbled up #30

Closed
AquaGeek opened this issue Mar 15, 2012 · 3 comments
Closed

Auth errors not getting bubbled up #30

AquaGeek opened this issue Mar 15, 2012 · 3 comments
Labels

Comments

@AquaGeek
Copy link

If the authentication operation fails at the

- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error

level, the error is not getting bubbled back up the chain so the caller has no idea if something went wrong. I accidentally mistyped the hostname for my authentication URL and couldn't figure out why nothing was happening.

@lukeredpath
Copy link
Contributor

Your right, the underlying connection error should be bubbled up. But you still should have been getting a call to the pusher:didFailToSubscribeToChannel:withError delegate call.

I'm enhancing this delegate call to include the underlying error if there is one.

@lukeredpath
Copy link
Contributor

Ah, I see the problem, the underlying connection was just calling [self setFinished:YES] in the didFailWithError method, when it should be calling [self finish], which is overridden in PTPusherChannelAuthorizationOperation to start the callback chain.

@AquaGeek
Copy link
Author

Thanks for fixing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants