diff --git a/src/apps.js b/src/apps.js index 448ebd227..2ca28c650 100644 --- a/src/apps.js +++ b/src/apps.js @@ -359,7 +359,7 @@ function downloadManifest(appStoreId, manifest, callback) { superagent.get(url).end(function (error, result) { if (error && !error.response) return callback(new AppsError(AppsError.EXTERNAL_ERROR, 'Network error downloading manifest:' + error.message)); - if (result.statusCode !== 200) return callback(new AppsError(AppsError.EXTERNAL_ERROR, util.format('Failed to get app info from store.', result.statusCode, result.text))); + if (result.statusCode !== 200) return callback(new AppsError(AppsError.BAD_FIELD, util.format('Failed to get app info from store.', result.statusCode, result.text))); callback(null, parts[0], result.body.manifest); }); diff --git a/src/routes/apps.js b/src/routes/apps.js index a0f207df1..13f5132d8 100644 --- a/src/routes/apps.js +++ b/src/routes/apps.js @@ -125,7 +125,6 @@ function installApp(req, res, next) { if (error && error.reason === AppsError.PORT_CONFLICT) return next(new HttpError(409, 'Port ' + error.message + ' is already in use.')); if (error && error.reason === AppsError.BAD_FIELD) return next(new HttpError(400, error.message)); if (error && error.reason === AppsError.BILLING_REQUIRED) return next(new HttpError(402, 'Billing required')); - if (error && error.reason === AppsError.NOT_FOUND) return next(new HttpError(404, 'No such app')); if (error && error.reason === AppsError.BAD_CERTIFICATE) return next(new HttpError(400, error.message)); if (error && error.reason === AppsError.USER_REQUIRED) return next(new HttpError(400, 'accessRestriction must specify one user')); if (error && error.reason === AppsError.EXTERNAL_ERROR) return next(new HttpError(503, error.message));