Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clearer alias for .ignore #28

Open
AdriVanHoudt opened this issue Oct 19, 2020 · 0 comments
Open

Clearer alias for .ignore #28

AdriVanHoudt opened this issue Oct 19, 2020 · 0 comments
Labels
feature New functionality or improvement

Comments

@AdriVanHoudt
Copy link

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:

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

@AdriVanHoudt AdriVanHoudt added the feature New functionality or improvement label Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality or improvement
Projects
None yet
Development

No branches or pull requests

1 participant