Unable to log a "request" event while using "response.failaction" settings as "log" instead of throwing an error.
- Dominant language
- JavaScript
- Stars
- 147
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
Description
Hapi allows you to choose what to do when response validation fails by setting response.failAction. (ref.: https://hapijs.com/tutorials/validation#failaction)
When we set that option to:

the current way that `hapi-pino` is set to log requests which have the `event.channel` set to `internal` doesn't recognizes that configuration and the log message is ignored.
This is where Hapi check for the response.failAction settings
**_node_modules/@hapi/hapi/lib/toolkit.js_**

This is where Hapi creates a log payload using the internal channel
**_node_modules/@hapi/hapi/lib/request.js_**

This is where `hapi-pino` is ignoring the log message:
**_node_modules/hapi-pino/index.js_**

Contributor guide
Assessment
This issue has not been assessed yet.