hapi-error-schemas

1.0.0 • Public • Published

hapi-error-schemas

Currently supports the following http error statuses:

  • 400
  • 401
  • 403
  • 404
  • 500

Usage

Install

npm install --save hapi-error-schemas

Use default statuses

const server = new hapi.Server({
  connections: {
    routes: {
      response: {
        status: require('hapi-error-schemas').statuses()
      }
    }
  }
});

Override statuses

const server = new hapi.Server({
  connections: {
    routes: {
      response: {
        status: require('hapi-error-schemas').statuses([400, 404, 500])
      }
    }
  }
});

/hapi-error-schemas/

    Package Sidebar

    Install

    npm i hapi-error-schemas

    Weekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • bigwednesdayio
    • brainsiq
    • toboid