fastify-boom

1.0.0 • Public • Published

fastify-boom

Fastify Boom support - HTTP-friendly error objects

Current Version Build Status

Install

npm i fastify-boom

Usage

const fastify = require('fastify')()
const Boom = require('boom')
 
fastify.register(require('fastify-boom'))
 
fastify.get('/', async function (req, reply) {
  throw new Boom('Opppps!')
})
 
fastify.listen(3000, err => {
  if (err) {
    fastify.log.error(err)
  }
})

Credits

  • boom HTTP-friendly error objects

/fastify-boom/

    Package Sidebar

    Install

    npm i fastify-boom

    Weekly Downloads

    541

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    6.61 kB

    Total Files

    12

    Last publish

    Collaborators

    • jeromemacias