Next Phenomenal Microbrewery
    Wondering what’s next for npm?Check out our public roadmap! »

    avocat
    DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/avocat package

    2.0.0 • Public • Published

    avocat

    A library to convert Objection errors to Boom errors

    Build Status Coverage Status

    Lead Maintainer: Daniel Cole

    Usage

    rethrow(error, [options])

    Throws a Boom error according to the Objection error received

    • error: - the Objection error (any other types of errors are just ignored)
    • options: - optional object where:
      • return: - if true will return the error instead of throwing it
      • includeMessage: if true the Boom error created will have it's message set to the message of the error thrown

    Heavily inspired by Bounce

    Install

    npm i avocat

    DownloadsWeekly Downloads

    120

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    4.51 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar