Skip to content

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

Description

@andoq

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions