Throw 504 where necessary

This commit is contained in:
Dane Everitt 2018-03-06 22:17:01 -06:00
parent d3f797bf2a
commit 4964d294f6
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
3 changed files with 12 additions and 2 deletions

View file

@ -80,8 +80,11 @@
}
}
}).fail(function (jqXHR) {
console.error(jqXHR);
element.find('[data-action="status"]').html('<span class="label label-default">Error</span>');
if (jqXHR.status === 504) {
element.find('[data-action="status"]').html('<span class="label label-default">Gateway Timeout</span>');
} else {
element.find('[data-action="status"]').html('<span class="label label-default">Error</span>');
}
});
}).promise().done(function () {
setTimeout(updateServerStatus, 10000);