从我的 Hapi 路线回复 Boom 错误时...
{
method: 'PUT',
path:'foo',
handler: function (request, reply) {
reply(Boom.badRequest('something', { stuff: 'and more' }));
}
}
...我得到以下回复:
{"statusCode":400,"error":"Bad Request","message":"something"}
它缺少提供错误详细信息的数据对象!这是怎么回事?