New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@tc-libs/errors

Package Overview
Dependencies
Maintainers
1
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tc-libs/errors

Catalogo di errori custom del monorepo.

latest
npmnpm
Version
3.9.0
Version published
Weekly downloads
128
-47.97%
Maintainers
1
Weekly downloads
 
Created
Source

@tc-libs/errors

Catalogo di errori custom del monorepo.

Il package contiene:

  • errori HTTP derivati da ApiError
  • errori applicativi puri (AppError)
  • errori di connessione/database/queue
  • interfacce di supporto

Struttura

Le cartelle api/400, api/401, api/403, ecc. espongono classi gia pronte per gli status code piu comuni.

Esempi di uso reale nel monorepo:

  • Api422ValidationError
  • Api401JWTAccessTokenUnauthorizedError
  • Api403AccessForError
  • Api404EntityNotFoundError
  • Api415UnsupportedMediaTypeError
  • Api408RequestTimeoutError

Base class

ApiError

Estende HttpException e aggiunge:

  • type
  • description
  • data
  • hasToLogConsole

Esempio:

throw new Api404EntityNotFoundError({ entity: 'User' });

AppError

Errore applicativo non HTTP, utile nel bootstrap o in flussi interni:

throw new AppMissingPortError();

Quando usarlo

Usa questo package quando vuoi:

  • lanciare errori HTTP coerenti con il formato atteso da @tc-libs/error-handler
  • evitare throw new HttpException(...) sparsi nel codice
  • standardizzare i message path usati da @tc-libs/message

Note operative

  • Gli handler e filtri del monorepo si aspettano eccezioni derivate da ApiError per arricchire la risposta.
  • Le classi sono numerose: conviene importare solo gli errori che ti servono.

Sviluppo

nx build errors
nx test errors

FAQs

Package last updated on 01 Apr 2026

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