Skip to content

Clearer alias for .ignore #28

@AdriVanHoudt

Description

@AdriVanHoudt

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew functionality or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions