Give useful information when box crashes or a request is otherwise terminated

This commit is contained in:
Johannes Zellner
2019-09-06 00:00:22 +02:00
parent 21981829fd
commit 6b29f57e1d

View File

@@ -189,6 +189,13 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
message = error;
}
// give more info in case the error was a request which failed with empty response body,
// this happens mostly if the box crashes
if (message === 'Empty message or object') {
message = 'Got empty response. Click to check the server logs.'
action = action || '/logs.html?id=box';
}
this.notify('Cloudron Error', message, true, 'error', action);
};