lstak/Backbone.SharePoint — pull request #9 by jeffgarretson (2013-01-28 23:27:55+00:00)
Title: Add Sync Error Callback

My application requires an error callback from sync(), so I added one. If $.ajax() returns an error message, I copy it to xhr.errorText so it makes its way back to the original error callback function (I needed to notify the end user of the server error message). All tests pass.

Tangentially, jQuery 1.9.0 incorrectly treats 204 response (no content) as an error; this will be fixed in jQuery 1.9.1. Meanwhile, I'd avoid jQuery 1.9.0 for production Backbone apps.