Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A tiny (dependency-free) utility to support attribute-based exception filtering for NestJS apps.

NotificationsYou must be signed in to change notification settings

micalevisk/nestjs-conditional-exception-filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm versionnpm downloads

A helper package to allow creating exception filters based on conditions on the exception!

Usage

npm install nestjs-conditional-exception-filter
import{Catch,ExceptionFilter}from'@nestjs/common'import{filter}from'nestjs-conditional-exception-filter'@Catch(filter({// Define for which instance this filter should be applied.// This is optional, so your filter no longer needs to work over class instances onlyfor:YourErrorClass,// And add your refined condition in this callback predicate functionwhen:(err)=>true}))exportclassYourFilterimplementsExceptionFilter{// ...}

About

A tiny (dependency-free) utility to support attribute-based exception filtering for NestJS apps.

Topics

Resources

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp