Fix BadNumberError code (#107)

lamassu-machine is expecting 401 for a bad number, but lamassu-server 
was returning 410 instead.
This commit is contained in:
Neal Conner 2018-03-08 10:26:44 +00:00 committed by Josh Harvey
parent ba65eea88d
commit 4108efd9c7

View file

@ -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)