# @doesrobbiedream/nest-catcher

> > Nest Catcher is a nest library to provide a homogeneous exception handling across your entire Nest API.

Latest version **0.2.0** (published 2022-01-23) · 0 weekly downloads

## Install

```sh
npm install @doesrobbiedream/nest-catcher
pnpm add @doesrobbiedream/nest-catcher
yarn add @doesrobbiedream/nest-catcher
bun add @doesrobbiedream/nest-catcher
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2022-01-23 |
| First published | 2022-01-23 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 62.3 KB |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| Maintainers | drd-nicolashernandezamor |

## Links

- npm: https://www.npmjs.com/package/@doesrobbiedream/nest-catcher
- npm.io page: https://npm.io/package/@doesrobbiedream/nest-catcher

## Dependencies (3)

- [rxjs](https://npm.io/package/rxjs.md) ~7.4.0
- [@nestjs/core](https://npm.io/package/@nestjs/core.md) ^8.0.0
- [@nestjs/common](https://npm.io/package/@nestjs/common.md) ^8.0.0

## Recent versions

- 0.2.0 (latest) — 2022-01-23

## README

# Nest Catcher

> Nest Catcher is a nest library to provide a homogeneous exception handling across your entire Nest API. 

It provides support for both monolithic APIs and distributed architecture.

On distributed architectures with a logical gateway, the first caught error that handles the exception will prevail and the following layers won't transform the response.

This allows to have multiple representations of the same error code that respect the domain into where it was fired.

---

For example:

On an Authentication Service a 409 error (Conflict) could represent a duplicated user trying to be injected.

On an Inventory Service could mean a given product is not accessible by the requesting user.

If a frontal layer has to know both meanings to handle the exception properly, the service isolation will be broken, although, we don't want each service to have their own exception handler, as the gateway has that responsability.

For that, Nest Catcher, provides an intuitive API to each service to handler their own exceptions and letting the gateway build the response as necessary with the data provided.

---
_Source: https://npm.io/package/@doesrobbiedream/nest-catcher · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
