# @essential-projects/errors_ts

> Technical errors that the protocol-adapters can handle

Latest version **1.6.1** (published 2019-11-25) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @essential-projects/errors_ts
pnpm add @essential-projects/errors_ts
yarn add @essential-projects/errors_ts
bun add @essential-projects/errors_ts
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.6.1 |
| Published | 2019-11-25 |
| First published | 2018-01-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 190.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | 5Minds IT-Solutions GmbH & Co KG |
| Maintainers | alexanderkasten, bjoern.roeber, heikomat, moellenbeck, obivarg, process-engine-ci, rrrene, sebastian.meier, vyperus |

## Links

- npm: https://www.npmjs.com/package/@essential-projects/errors_ts
- Repository: https://github.com/essential-projects/errors_ts
- Homepage: https://github.com/essential-projects/errors_ts#readme
- Issues: https://github.com/essential-projects/errors_ts/issues
- npm.io page: https://npm.io/package/@essential-projects/errors_ts

## Recent versions

- 1.6.1 (latest) — 2019-11-25
- 1.6.1-70b53c13-b25 (develop) — 2019-12-13
- 1.6.1-445bb658-b21 — 2019-11-25
- 1.6.0-f604adb0-b20 — 2019-11-25
- 1.6.0 — 2019-11-25
- 1.5.3-3389bec5-b19 — 2019-11-19
- 1.5.3 — 2019-11-19
- 1.5.2 — 2019-10-29
- 1.5.2-5edc3ddd-b18 — 2019-10-29
- 1.5.1 — 2019-10-29
- 1.5.1-b8b30ea5-b17 — 2019-10-29
- 1.5.0-b329490f-b16 — 2019-06-03
- 1.5.0-7c4c0df0-b15 — 2019-05-20
- 1.5.0-7c4c0df0-b14 — 2019-05-20
- 1.5.0-7c4c0df0-b13 — 2019-05-20
- … 76 more at https://npm.io/package/@essential-projects/errors_ts/versions

## README

# Errors_ts

A technical error provider.

## Usage

1. If you build a transport layer, ...

   ... you can implement the handling of the Technical Errors provided by this
   package, so that when someone uses your layer, and an error ist thrown, you
   can handle it correctly.

1. If you want to use essential-projects-errors, ...

   ... you can just use the Errors provided by this package directly, or write your
   own non-technical errors that extend these errors.

   Every library that can handle these errors will be able to also correctly handle
   your extensions of these errors.

1. Either way...

   ... you just need to install it with:

   ```bash
   npm install --save @essential-projects/errors_ts
   ```

   And then import the errors like this:

   ```js
   // JavaScript-variant
   const ERRORNAME = require('@essential-projects/errors_ts').ERRORNAME`

   // typescript-variant
   import {ERRORNAME1, ERRORNAME2, ERRORNAME3} from '@essential-projects/errors_ts';
   ```

   Where `ERRORNAME` is the name error you want to import.

   All essential-projects-errors have the `isEssentialProjectsError`-property, so they can be identified as such.

# Test

In order to run the test:

```bash
npm test
```

# Errors

The Errors are mostly based on
[http-status-codes](https://de.wikipedia.org/wiki/HTTP-Statuscode).
Every Error, except for the `BaseError` directly extends `BaseError`, and
`BaseError` extends `Error`


| Name                               | Code    |
| ---                                | ---     |
| BaseError                          |         |
|                                    |         |
| **Information Errors**             | **1xx** |
| ContinueError                      | 100     |
| SwitchingProtocolsError            | 101     |
| ProcessingError                    | 102     |
|                                    |         |
| **Redirect Errors**                | **3xx** |
| MultipleChoicesError               | 300     |
| MovedError                         | 301     |
| FoundError                         | 302     |
| SeeOtherError                      | 303     |
| NotModifiedError                   | 304     |
| UseProxyError                      | 305     |
| TemporaryRedirectError             | 307     |
| PermanentRedirectError             | 308     |
|                                    |         |
| **Client Errors**                  | **4xx** |
| BadRequestError                    | 400     |
| UnauthorizedError                  | 401     |
| PaymentRequiredError               | 402     |
| ForbiddenError                     | 403     |
| NotFoundError                      | 404     |
| MethodNotAllowedError              | 405     |
| NotAcceptableError                 | 406     |
| ProxyAuthenticationRequiredError   | 407     |
| RequestTimeoutError                | 408     |
| ConflictError                      | 409     |
| GoneError                          | 410     |
| LengthRequiredError                | 411     |
| PreconditionFailedError            | 412     |
| RequestTooLargeError               | 413     |
| URLTooLongError                    | 414     |
| UnsupportedMediaTypeError          | 415     |
| RequestedRangeNotSatisfiableError  | 416     |
| ExpectationFailedError             | 417     |
| ImATeapotError                     | 418     |
| PolicyNotFulfilledError            | 420     |
| MisdirectredRequestError           | 421     |
| UnprocessableEntityError           | 422     |
| LockedError                        | 423     |
| FailedDependencyError              | 424     |
| UpgradeRequiredError               | 426     |
| PreconditionRequiredError          | 428     |
| TooManyRequestsError               | 429     |
| RequestHeaderTooLargeError         | 431     |
| UnavaliableForLegalReasonsError    | 451     |
|                                    |         |
| **Server Errors**                  | **5xx** |
| InternalServerError                | 500     |
| NotImplementedError                | 501     |
| BadGatewayError                    | 502     |
| ServiceUnavaliableError            | 503     |
| GatewayTimeoutError                | 504     |
| VersionNotSupportedError           | 505     |
| InsufficientStorageError           | 507     |
| LoopDetectedError                  | 508     |
| BandwithLimitExceededError         | 509     |
| NetworkAuthenticationRequiredError | 511     |

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