Skip to content

Errors in jQuery AJAX callbacks using promise syntax are not caught #326

Closed
@tgr

Description

@tgr

The jQuery plugin wraps callbacks passed as the success/error/complete property of the option object, but that will not affect the recommended usage of AJAX in jQuery, in which the callbacks are attached to a promise:
$.ajax('', {success: someFunction}); // this will be caught
$.ajax('').done(someFunction); // this won't

(Of course, the window.onError handler will catch everything eventually, but that has its own problems.)

Testcase: http://jsfiddle.net/zm7tor7j/

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