Nuclear Powered Marshmallows
Have opinions about JavaScript? We want to hear them. Take the 2018 JavaScript Ecosystem Survey »

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])
      }
    }
  }
});

install

npm i hapi-error-schemas

Downloadsweekly downloads

2

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
Report a vulnerability