Fix ajax error catcher catching aborted calls #1

This commit is contained in:
Ramon Gutierrez 2018-02-17 13:02:29 +08:00
parent 13d4a19e6f
commit e360fbbbd2

View file

@ -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