errorMessage -> errorJson
This commit is contained in:
@@ -593,7 +593,7 @@ function install(app, restoreConfig, progressCallback, callback) {
|
||||
], function seriesDone(error) {
|
||||
if (error) {
|
||||
debugApp(app, 'error installing app: %s', error);
|
||||
return updateApp(app, { installationState: appdb.ISTATE_ERROR, errorMessage: error.message }, callback.bind(null, error));
|
||||
return updateApp(app, { installationState: appdb.ISTATE_ERROR, error: { message: error.message } }, callback.bind(null, error));
|
||||
}
|
||||
callback(null);
|
||||
});
|
||||
@@ -611,11 +611,11 @@ function backup(app, progressCallback, callback) {
|
||||
}),
|
||||
|
||||
progressCallback.bind(null, { percent: 100, message: 'Done' }),
|
||||
updateApp.bind(null, app, { installationState: appdb.ISTATE_INSTALLED, errorMessage: '' })
|
||||
updateApp.bind(null, app, { installationState: appdb.ISTATE_INSTALLED, error: null })
|
||||
], function seriesDone(error) {
|
||||
if (error) {
|
||||
debugApp(app, 'error backing up app: %s', error);
|
||||
return updateApp(app, { installationState: appdb.ISTATE_INSTALLED, errorMessage: error.message }, callback.bind(null, error)); // return to installed state intentionally
|
||||
return updateApp(app, { installationState: appdb.ISTATE_INSTALLED, error: { message: error.message } }, callback.bind(null, error)); // return to installed state intentionally
|
||||
}
|
||||
callback(null);
|
||||
});
|
||||
@@ -692,11 +692,11 @@ function configure(app, oldConfig, progressCallback, callback) {
|
||||
configureReverseProxy.bind(null, app),
|
||||
|
||||
progressCallback.bind(null, { percent: 100, message: 'Done' }),
|
||||
updateApp.bind(null, app, { installationState: appdb.ISTATE_INSTALLED, errorMessage: '', health: null })
|
||||
updateApp.bind(null, app, { installationState: appdb.ISTATE_INSTALLED, error: null, health: null })
|
||||
], function seriesDone(error) {
|
||||
if (error) {
|
||||
debugApp(app, 'error reconfiguring : %s', error);
|
||||
return updateApp(app, { installationState: appdb.ISTATE_ERROR, errorMessage: error.message }, callback.bind(null, error));
|
||||
return updateApp(app, { installationState: appdb.ISTATE_ERROR, error: { message: error.message }}, callback.bind(null, error));
|
||||
}
|
||||
callback(null);
|
||||
});
|
||||
@@ -798,14 +798,14 @@ function update(app, updateConfig, progressCallback, callback) {
|
||||
runApp.bind(null, app, progressCallback),
|
||||
|
||||
progressCallback.bind(null, { percent: 100, message: 'Done' }),
|
||||
updateApp.bind(null, app, { installationState: appdb.ISTATE_INSTALLED, errorMessage: '', health: null, updateTime: new Date() })
|
||||
updateApp.bind(null, app, { installationState: appdb.ISTATE_INSTALLED, error: null, health: null, updateTime: new Date() })
|
||||
], function seriesDone(error) {
|
||||
if (error && error.backupError) {
|
||||
debugApp(app, 'update aborted because backup failed', error);
|
||||
updateApp(app, { installationState: appdb.ISTATE_INSTALLED, errorMessage: '', health: null }, callback.bind(null, error));
|
||||
updateApp(app, { installationState: appdb.ISTATE_INSTALLED, error: null, health: null }, callback.bind(null, error));
|
||||
} else if (error) {
|
||||
debugApp(app, 'Error updating app: %s', error);
|
||||
updateApp(app, { installationState: appdb.ISTATE_ERROR, errorMessage: error.message, updateTime: new Date() }, callback.bind(null, error));
|
||||
updateApp(app, { installationState: appdb.ISTATE_ERROR, error: { message: error.message }, updateTime: new Date() }, callback.bind(null, error));
|
||||
} else {
|
||||
if (updateConfig.skipNotification) return callback();
|
||||
|
||||
@@ -859,7 +859,7 @@ function uninstall(app, progressCallback, callback) {
|
||||
], function seriesDone(error) {
|
||||
if (error) {
|
||||
debugApp(app, 'error uninstalling app: %s', error);
|
||||
return updateApp(app, { installationState: appdb.ISTATE_ERROR, errorMessage: error.message }, callback.bind(null, error));
|
||||
return updateApp(app, { installationState: appdb.ISTATE_ERROR, error: { message: error.message } }, callback.bind(null, error));
|
||||
}
|
||||
callback(null);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user