Here is a part of my code I am trying
const boom = require('boom')
exports.checkOtp = async (req, reply) => {
try {
return boom.badRequest('no active otp')
} catch (err) {
throw boom.boomify(err)
}
}
I am getting
{
"statusCode": 500,
"error": "Internal Server Error",
"message": "no active otp"
}
boom.badRequest
should fire a 400
right?