Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
wrapError replacement for backbone.js
var sync = Backbone.sync;
Backbone.sync = function(method, model, options) {
if (!options.error) {
options.error = function(method, model, options) {
// custom error handling here.
}
}
};
sync(method, model, options);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.