🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

unify-fastify

Package Overview
Dependencies
Maintainers
1
Versions
742
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unify-fastify

[![Test Coverage](https://api.codeclimate.com/v1/badges/d47a13f51cd7b2e75029/test_coverage)](https://codeclimate.com/github/qlaffont/unify-fastify/test_coverage) [![Maintainability](https://api.codeclimate.com/v1/badges/d47a13f51cd7b2e75029/maintainabilit

1.5.329
latest
Source
npm
Version published
Maintainers
1
Created
Source

Test Coverage Maintainability npm npm Snyk Vulnerabilities for npm package NPM

Unify Fastify

A Fastify plugin wrapping unify-errors to handle REST errors. Old Owner: @flexper

Install

npm i unify-fastify
# Or
yarn add unify-fastify
# Or
pnpm add unify-fastify

Use

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'})
})

Plugin options

namedefaultdescription
disableDetailsfalseDisable error details like stack
disableLogfalseDisable logging on error

Tests

To execute jest tests (all errors, type integrity test)

pnpm test

Maintain

This package use TSdx. Please check documentation to update this package.

FAQs

Package last updated on 28 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts