diff --git a/src/js/client.js b/src/js/client.js index 7c48caf28..2926b18ee 100644 --- a/src/js/client.js +++ b/src/js/client.js @@ -38,10 +38,15 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout // 401 is when the token is invalid. 403 can happen when the token is valid but missing scopes (like when user became admin) // re-login will make the code get a new token if (status === 401 || status === 403) return client.login(); - if (status >= 500) { - if (!client.offline) client.error(data); - client.offline = true; + if (status === 500 || status === 501) { + if (!client.offline) client.error(data); + } else if (status === 502 || status === 503 || status === 504) { + // This means the box service is not reachable. We just show offline banner for now + } + + if (status >= 500) { + client.offline = true; return callback(new ClientError(status, data)); }