Fix copy/paste errors

This commit is contained in:
Girish Ramakrishnan
2017-04-13 00:19:11 -07:00
parent e1740a0d4b
commit 54f7cf5f64
2 changed files with 2 additions and 2 deletions

View File

@@ -537,7 +537,7 @@ function sendAliveStatus(callback) {
var url = config.apiServerOrigin() + '/api/v1/exchangeBoxTokenWithUserToken';
superagent.post(url).query({ token: config.token() }).timeout(30 * 1000).end(function (error, result) {
if (error && !error.response) return callback(new CloudronError(CloudronError.EXTERNAL_ERROR, error));
if (result.statusCode !== 201) return callback(new CloudronError(CloudronError.EXTERNAL_ERROR, util.format('App purchase failed. %s %j', result.status, result.body)));
if (result.statusCode !== 201) return callback(new CloudronError(CloudronError.EXTERNAL_ERROR, util.format('Token exchange failed. %s %j', result.status, result.body)));
sendAliveStatusWithAppstoreConfig(backendSettings, result.body);
});