Do not show scary red error notifications on timeouts or other 500
Instead dump to terminal with email instructions
This commit is contained in:
+5
-1
@@ -238,7 +238,11 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
if (status === 401) return client.login();
|
||||
|
||||
if (status === 500 || status === 501) {
|
||||
if (!client.offline) client.error(data);
|
||||
// actual internal server error, most likely a bug or timeout log to console only to not alert the user
|
||||
if (!client.offline) {
|
||||
console.error(status, data);
|
||||
console.log('------\nCloudron Internal Error\n\nIf you see this, please send a mail with above log to support@cloudron.io\n------\n');
|
||||
}
|
||||
} else if (status === 502 || status === 503 || status === 504) {
|
||||
// This means the box service is not reachable. We just show offline banner for now
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user