hapijs / hapijs/bounce

Clearer alias for .ignore

Open
#28 0 comments 1 reaction 0 assignees View on GitHub
feature
Dominant language
JavaScript
Stars
177
Forks
14
PR merge metrics
No merged PRs in 30d

Description

#### Support plan

* *is this issue currently blocking your project?* (yes/no): no
* *is this issue affecting a production system?* (yes/no): no

#### Context

* *node version*: 12.19.0
* *module version*: 2.0.0
* *environment* (e.g. node, browser, native): node
* *used with* (e.g. hapi application, another framework, standalone, ...): hapi / any node thing
* *any other relevant information*:

#### What problem are you trying to solve?

I recently came upon a use case for .ignore:

```js
try {
await test.case();
}
catch (err) {
bounce.ignore(err, { message : 'nope' });
return;
}
```

But I ended up not using it as I didn't deem it clear enough for anyone not super familiar with Bounce what will happen there.

The accompanying slack discussion: https://hapihour.slack.com/archives/C6BMHNBLM/p1602682096074500

#### Do you have a new or modified API suggestion to solve the problem?

There were suggestion for
`Bounce.rethrowUnless()` or `Bounce.except()` which I liked

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.