Fix ajax error catcher catching aborted calls #1
This commit is contained in:
parent
13d4a19e6f
commit
e360fbbbd2
1 changed files with 5 additions and 0 deletions
|
|
@ -1,5 +1,10 @@
|
|||
$(function() {
|
||||
$(document).ajaxError(function(event, response, ajaxSettings, thrownError) {
|
||||
if (response.statusText === "abort") {
|
||||
// we do not catch aborted calls
|
||||
return;
|
||||
}
|
||||
|
||||
switch (response.status) {
|
||||
case 422:
|
||||
// we leave 422 handling to individual calls
|
||||
|
|
|
|||
Loading…
Reference in a new issue