Open dave-irvine opened 7 years ago
Turns out I can't do
res.status(400).send('Unsupported parameter');
because the middleware is not chainable like express. It's a confusing mashup of the two.
res.statusCode = 400;
res.end({
message: 'Unsupported parameter',
});
works, but is quite ugly.
Hi,
I can't find any documentation that tells me how to reply with an error when using the hapi middleware. Ideally I would use Boom, as this is what I am used to with hapi.
Usually my route handler would look like:
however with swagger-node-runner my route handlers have to be of the
req,res
variety, which has no Boom integration.I suppose I could do
but that kind of negates the usefulness of Boom.
Any ideas?