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