From eaeaf92c1a22e7e52b85e65aafe7d09dd4d502ae Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Mon, 4 Jul 2016 23:32:27 -0500 Subject: [PATCH] handle BAD_FIELD --- src/routes/cloudron.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/routes/cloudron.js b/src/routes/cloudron.js index 064ccf7be..9be3aee06 100644 --- a/src/routes/cloudron.js +++ b/src/routes/cloudron.js @@ -133,6 +133,7 @@ function migrate(req, res, next) { cloudron.migrate(req.body, function (error) { // pass req.body because 'domain' can have arbitrary options if (error && error.reason === CloudronError.BAD_STATE) return next(new HttpError(409, error.message)); + if (error && error.reason === CloudronError.BAD_FIELD) return next(new HttpError(400, error.message)); if (error) return next(new HttpError(500, error)); next(new HttpSuccess(202, {}));