mavenlink/brainstem-js — pull request #8 by perspectivezoom (2013-06-21 23:50:39+00:00)
Title: StorageManager.errorInterceptor update to work with Backbone 1.0

In Backbone 1.0, wrapError is:
```
var wrapError = function (model, options) {
var error = options.error;
options.error = function(resp) {
if (error) error(model, resp, options);
model.trigger('error', model, resp, options);
};
};
```

In Backbone 0.92, it was:
```
Backbone.wrapError = function(onError, originalModel, options) {
return function(model, resp) {
resp = model === originalModel ? resp : model;
if (onError) {
onError(originalModel, resp, options);
} else {
originalModel.trigger('error', originalModel, resp, options);
}
};
};
```

The 0.92 wrapError inner function took (model, resp), so we used `handler?(modelOrCollection, jqXHR)`. The 1.0 wrapError inner function only takes (resp), so we need to change it to `handler?(jqXHR)`