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:
parent
ba65eea88d
commit
4108efd9c7
1 changed files with 1 additions and 1 deletions
|
|
@ -171,7 +171,7 @@ function getCustomerWithPhoneCode (req, res, next) {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
if (err.name === 'BadNumberError') throw httpError('Bad number', 410)
|
if (err.name === 'BadNumberError') throw httpError('Bad number', 401)
|
||||||
throw err
|
throw err
|
||||||
})
|
})
|
||||||
.catch(next)
|
.catch(next)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue