这是我正在尝试的代码的一部分
const boom = require('boom')
exports.checkOtp = async (req, reply) => {
try {
return boom.badRequest('no active otp')
} catch (err) {
throw boom.boomify(err)
}
}
我正进入(状态
{
"statusCode": 500,
"error": "Internal Server Error",
"message": "no active otp"
}
boom.badRequest
应该开火400
吧?