jashkenas/backbone — pull request #2928 by c960657 (2013-12-18 13:54:33+00:00)
Title: Pass along jqXhr, status and errorThrown from jqXhr callbacks

In options.error() it would be useful to get access to the statusText argument passed to jqXhr.error() to know some more about the error.

This patch passes along all parameters from the jqXhr callbacks to callbacks and event handlers.

This was previously suggested in #485, but I don't think it was actually implemented (or it has been changed again later). Simply getting the response object is not sufficient - AFAICT the statusText and errorThrown arguments are not available on the response object. It was also suggested in #2147, but this PR was closed without any discussion.

The order of the arguments is not consistent between success() and error(). This just maintains status quo, but it does make the issue more visible. Not sure what to do about this without breaking BC.