{"action":"created","issue":{"url":"https://api.github.com/repos/jquery/api.jquery.com/issues/815","labels_url":"https://api.github.com/repos/jquery/api.jquery.com/issues/815/labels{/name}","comments_url":"https://api.github.com/repos/jquery/api.jquery.com/issues/815/comments","events_url":"https://api.github.com/repos/jquery/api.jquery.com/issues/815/events","html_url":"https://github.com/jquery/api.jquery.com/issues/815","id":111022721,"number":815,"title":"Feature Request: ajaxError interceptor rather than on document","user":{"login":"flavouski","id":3944472,"avatar_url":"https://avatars.githubusercontent.com/u/3944472?v=3","gravatar_id":"","url":"https://api.github.com/users/flavouski","html_url":"https://github.com/flavouski","followers_url":"https://api.github.com/users/flavouski/followers","following_url":"https://api.github.com/users/flavouski/following{/other_user}","gists_url":"https://api.github.com/users/flavouski/gists{/gist_id}","starred_url":"https://api.github.com/users/flavouski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flavouski/subscriptions","organizations_url":"https://api.github.com/users/flavouski/orgs","repos_url":"https://api.github.com/users/flavouski/repos","events_url":"https://api.github.com/users/flavouski/events{/privacy}","received_events_url":"https://api.github.com/users/flavouski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-12T17:46:12Z","updated_at":"2015-10-12T18:45:15Z","closed_at":null,"body":"I call the .ajaxError() command on the document object, but it doesn't do enough for our situation.\r\n\r\n```$(document).ajaxError(function(event, jqxhr, settings, thrownError) {}```\r\n\r\nIt isn't intercepting the ajax request, it is waiting for it to bubble-up to the document, which I can see a case for both.  But currently there is no way to intercept it (unless making your own ajax method which calls JQuery's, but even then, 3rd party plugins aren't able to be controlled easily).\r\n\r\nI guess this is a feature, but it would be nice to have it mentioned in the documentation also."},"comment":{"url":"https://api.github.com/repos/jquery/api.jquery.com/issues/comments/147488693","html_url":"https://github.com/jquery/api.jquery.com/issues/815#issuecomment-147488693","issue_url":"https://api.github.com/repos/jquery/api.jquery.com/issues/815","id":147488693,"user":{"login":"AurelioDeRosa","id":1430979,"avatar_url":"https://avatars.githubusercontent.com/u/1430979?v=3","gravatar_id":"","url":"https://api.github.com/users/AurelioDeRosa","html_url":"https://github.com/AurelioDeRosa","followers_url":"https://api.github.com/users/AurelioDeRosa/followers","following_url":"https://api.github.com/users/AurelioDeRosa/following{/other_user}","gists_url":"https://api.github.com/users/AurelioDeRosa/gists{/gist_id}","starred_url":"https://api.github.com/users/AurelioDeRosa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AurelioDeRosa/subscriptions","organizations_url":"https://api.github.com/users/AurelioDeRosa/orgs","repos_url":"https://api.github.com/users/AurelioDeRosa/repos","events_url":"https://api.github.com/users/AurelioDeRosa/events{/privacy}","received_events_url":"https://api.github.com/users/AurelioDeRosa/received_events","type":"User","site_admin":false},"created_at":"2015-10-12T18:45:15Z","updated_at":"2015-10-12T18:45:15Z","body":"Hi.\r\n\r\nThe `ajaxError()` method should only be attached to `document` since version 1.8. If you want to do something before an Ajax request is sent, you might want to use [`.ajaxPrefilter()`](http://api.jquery.com/jQuery.ajaxPrefilter/)."}}