Coder Social home page Coder Social logo

qlaffont / unify-fastify Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 2.09 MB

Fastify error handler with unify-errors

Home Page: https://www.npmjs.com/package/unify-fastify

License: MIT License

TypeScript 100.00%
fastify rest typescript unify-errors

unify-fastify's Introduction

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

name default description
disableDetails false Disable error details like stack
disableLog false Disable 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.

unify-fastify's People

Contributors

mike-flexper avatar qlaffont avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

unify-fastify's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/main.yml
  • actions/checkout v4
  • actions/setup-node v4
  • pnpm/action-setup v3.0.0
  • actions/checkout v4
  • actions/setup-node v4
  • pnpm/action-setup v3.0.0
  • paambaati/codeclimate-action v5.0.0
.github/workflows/publish.yml
  • dorny/paths-filter v3
  • actions/checkout v4
  • actions/setup-node v4
  • pnpm/action-setup v3.0.0
  • qzb/standard-version-action v1.0.13
  • JS-DevTools/npm-publish v3
npm
package.json
  • fastify ^4.26.0
  • fastify-plugin ^4.5.1
  • unify-errors ^1.2.202
  • @jest/globals 29.7.0
  • @size-limit/preset-small-lib 11.1.2
  • @types/jest ^29.5.12
  • @types/node 20.12.7
  • @typescript-eslint/eslint-plugin 7.7.1
  • @typescript-eslint/parser 7.7.1
  • eslint 8.57.0
  • eslint-config-prettier 9.1.0
  • eslint-plugin-import 2.29.1
  • eslint-plugin-prettier 5.1.3
  • eslint-plugin-simple-import-sort 12.1.0
  • husky 9.0.11
  • jest ^29.7.0
  • prettier 3.2.5
  • size-limit 11.1.2
  • ts-jest ^29.1.2
  • tsdx 0.14.1
  • tslib 2.6.2
  • typescript 5.4.5
  • wds 0.19.0
  • fastify-auth-prisma ^1.2.14
  • node >=10
nvm
.nvmrc
  • node 20.12.2

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.