[](https://codeclimate.com/github/qlaffont/unify-fastify/test_coverage) [

!npm !npm !Snyk Vulnerabilities for npm package !NPM
A Fastify plugin wrapping unify-errors to handle REST errors. Old Owner: @flexper
``sh`
npm i unify-fastifyOr
yarn add unify-fastifyOr
pnpm add unify-fastify
`typescript
import fastify from 'fastify'
import unifyFastifyPlugin from 'unify-fastify';
import { BadRequest } from 'unify-errors';
const server = fastify()
server.register(unifyFastifyPlugin, { / options / })
server.get('/bad-request', async () => {
throw new BadRequest({ example: 'A bad request error'})
})
`
| name | default | description |
| ---------------- | ------- | -------------------------------- |
| _disableDetails_ | false | Disable error details like stack |
| _disableLog_ | false | Disable logging on error |
To execute jest tests (all errors, type integrity test)
```
pnpm test
This package use TSdx. Please check documentation to update this package.