hapijs / hapijs/hapi-pino

Is a default failAction needed to log errors?

Open
#129 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
147
Forks
56
PR merge metrics
No merged PRs in 30d

Description

I'm completely new to Hapi, I'm just trying to contribute to another project that uses it.

If I am using `hapi-pino`, is it useful to have a default `route.options.response.failAction` like the following:

```
routes: {
response: {
failAction: (request, h, err) => {
request.log(['error'], err);
return Boom.badRequest();
}
}
}
```

Or without this default `failAction`, will errors still be captured by `hapi-pino`?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.