This not an error if a cloudron is not yet registered

The change avoids scary logs with backtrace
This commit is contained in:
Johannes Zellner
2017-01-17 11:41:34 +01:00
parent 801367b68d
commit 81b7e5645c

View File

@@ -495,7 +495,11 @@ function sendAliveStatus(callback) {
} else {
settings.getAppstoreConfig(function (error, result) {
if (error) return callback(new CloudronError(CloudronError.INTERNAL_ERROR, error));
if (!result.token) return callback(new CloudronError(CloudronError.INTERNAL_ERROR, 'not registered yet'));
if (!result.token) {
debug('sendAliveStatus: Cloudron not yet registered');
return callback(null);
}
sendAliveStatusWithAppstoreConfig(backendSettings, result);
});