Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nanogiants/nestjs-swagger-api-exception-decorator

Package Overview
Dependencies
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nanogiants/nestjs-swagger-api-exception-decorator

NestJS Swagger decorator for API exceptions

  • 1.6.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
21K
decreased by-8.06%
Maintainers
3
Weekly downloads
 
Created
Source

NestJS Swagger API Exception Decorator

Node.js CI Quality Gate Status Coverage npm npm downloads

Description

NestJS Swagger decorator for API exceptions.

Installation

$ npm i @nanogiants/nestjs-swagger-api-exception-decorator

Example

import { ApiException } from '@nanogiants/nestjs-swagger-api-exception-decorator';

@ApiException(() => UnauthorizedException)
export class Controller {
  @ApiOperation({ summary: 'Changes the users password' })
  @ApiException(() => [PasswordsDidNotMatchException, OldAndNewPasswordMatchException, CredentialsNotValidException])
  @Patch('/password')
  async changeUserPassword(@Res() res: Response): Promise<void> {
    return res.sendStatus(HttpStatus.OK);
  }
}

Getting Started

Please visit our documentation to get started.

Release Notes

Please visit the Release Notes in our documentation for major and minor releases. Patch releases are documentated in GitHub Releases.

Keywords

FAQs

Package last updated on 12 Sep 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc