How to capture callback from failed validation in Joi
问题 We're building a web service using Hapi. Our routes have some validation. I was wondering if it was possible to capture or override the default callback on failed validation, before or after hapi replies to the client. my (non-working) code: { method: 'GET', config: { tags: tags, validate: { params: { id: Joi.number() .required() .description('id of object you want to get'), }, //Tried this, and it's not working: callback: function(err, value) { if (err) { console.log('need to catch errors