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