From 4108efd9c729e7f92bc022d1533a149bd6b4ba03 Mon Sep 17 00:00:00 2001 From: Neal Conner Date: Thu, 8 Mar 2018 10:26:44 +0000 Subject: [PATCH] Fix BadNumberError code (#107) lamassu-machine is expecting 401 for a bad number, but lamassu-server was returning 410 instead. --- lib/routes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes.js b/lib/routes.js index 8f169e24..36c73e65 100644 --- a/lib/routes.js +++ b/lib/routes.js @@ -171,7 +171,7 @@ function getCustomerWithPhoneCode (req, res, next) { }) }) .catch(err => { - if (err.name === 'BadNumberError') throw httpError('Bad number', 410) + if (err.name === 'BadNumberError') throw httpError('Bad number', 401) throw err }) .catch(next)