Is there way to bind one error handler for ajax requests that performs by backbone.js?
My situation: I can get 401 (Unauthorized) at any time, so I need to show logi
Use jQuery directly for this.
$(document).ajaxError(function (e, xhr, options) { // do your stuff });
You can do the same thing for CSRF in rails for exemple (using ajaxSend).
You can read more here: http://api.jquery.com/jQuery.ajax#advanced-options