parse the response

This commit is contained in:
Girish Ramakrishnan
2016-06-13 18:11:11 -07:00
parent 942339435a
commit 53cd45496b
3 changed files with 9 additions and 2 deletions

View File

@@ -185,6 +185,7 @@ function restoreApp(req, res, next) {
if (error && error.reason === AppsError.NOT_FOUND) return next(new HttpError(404, 'No such app'));
if (error && error.reason === AppsError.BAD_FIELD) return next(new HttpError(400, error.message));
if (error && error.reason === AppsError.BAD_STATE) return next(new HttpError(409, error.message));
if (error && error.reason === AppsError.EXTERNAL_ERROR) return next(new HttpError(424, error.message));
if (error) return next(new HttpError(500, error));
next(new HttpSuccess(202, { }));