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

ajax errors in requests silently fail, never close the deferred object. #46

Open
andoq opened this issue May 13, 2015 · 0 comments
Open

Comments

@andoq
Copy link

andoq commented May 13, 2015

If I make a request like so:

$.embedly.extract(url).done( successHandler ).fail(failHandler)

Then failHandler will never get called. If the embed.ly service returns any 500 error (I've seen several 503 server at capacity errors lately) or 400 error, the deferred object will never be resolved and neither of the handlers will be called.

This can be simulated by changing line 134, which builds the url, to call a bad url: '://api.embed.ly/badurl/' - this will return a 404.

I believe part of the fix would be to update the ajax call on line 197 to handle things other than success, but looking into the Keeper object it doesn't seem to be setup to handle this. I've setup my own client-side code to handle if the embed.ly service is temporarily unavailable or the ajax call just decides to not work, as happens, and update the client appropriately, but this doesn't work because fail handler is never called.

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

No branches or pull requests

1 participant