From 7e68fc136076f2385030faf58f43f6764c0f69d7 Mon Sep 17 00:00:00 2001 From: Kumar Damani Date: Tue, 26 Mar 2019 16:17:46 -0400 Subject: changing error code to 422 for one of the validation conditions --- web/routes/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web') diff --git a/web/routes/index.js b/web/routes/index.js index 4bbd7f6..0c72e43 100644 --- a/web/routes/index.js +++ b/web/routes/index.js @@ -33,7 +33,7 @@ router.post('/mobilerequest', function(req, res) { if (!point.coordinates.length) { var errMssg = "Coordinates field must not be empty in a request."; - return res.status(200).send({ error: errMssg }); + return res.status(422).send({ error: errMssg }); } if (!glookup.hasContainers(point)) { -- cgit v1.2.3