getsentry/raven-js — pull request #266 by matghaleb (2014-10-15 14:48:47+00:00)
Title: jQuery Plugin: Wrap jqXHR promise callbacks

Since jQuery 1.5, jQuery.ajax implements the Promise interface and that's why the jqXHR.done(), jqXHR.fail(), jqXHR.always(), jqXHR.then() callbacks need to be wrapped too.
Note that the jqXHR.success(), jqXHR.error(), and jqXHR.complete() callbacks are deprecated as of jQuery 1.8 but are still exposed.