Skip to content

jeromemacias/fastify-boom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6e38590 · Sep 1, 2020

History

43 Commits
Jan 21, 2018
Jan 21, 2018
Sep 1, 2020
Jan 21, 2018
Jan 21, 2018
Jan 21, 2018
Sep 1, 2020
Jan 21, 2018
Jan 23, 2018
Sep 1, 2020
Sep 1, 2020
Sep 1, 2020
Sep 1, 2020
Sep 1, 2020

Repository files navigation

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