# @springworks/error-factory

> Custom error that makes use of HTTP error codes to identify different error types.

Latest version **3005.464.1** (published 2025-11-14) · 0 weekly downloads

## Install

```sh
npm install @springworks/error-factory
pnpm add @springworks/error-factory
yarn add @springworks/error-factory
bun add @springworks/error-factory
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 3005.464.1 |
| Published | 2025-11-14 |
| First published | 2015-07-01 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 34.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | springworksprime, springworksdev |

## Links

- npm: https://www.npmjs.com/package/@springworks/error-factory
- Repository: https://github.com/Springworks/m2h-mono
- Homepage: https://github.com/Springworks/m2h-mono/tree/master/packages/error-factory#readme
- npm.io page: https://npm.io/package/@springworks/error-factory

## Dependencies (4)

- [@hapi/boom](https://npm.io/package/@hapi/boom.md) ^10.0.1
- [@springworks/http-status](https://npm.io/package/@springworks/http-status.md) 3005.464.1
- [@springworks/random-string](https://npm.io/package/@springworks/random-string.md) 3005.464.1
- [@springworks/swagger-schema-interfaces](https://npm.io/package/@springworks/swagger-schema-interfaces.md) 3005.464.1

## Recent versions

- 3005.464.1 (latest) — 2025-11-14
- 3005.450.0 — 2025-07-03
- 3005.418.0 — 2025-01-23
- 3005.383.0 — 2024-10-09
- 3005.367.0 — 2024-09-13
- 3005.340.0 — 2024-06-25
- 3005.335.1 — 2024-06-24
- 3005.329.0 — 2024-05-24
- 3005.287.0 — 2024-03-08
- 3005.272.0 — 2024-02-12
- 3005.258.0 — 2023-12-18
- 3005.250.0 — 2023-10-26
- 3005.229.0 — 2023-06-20
- 3005.192.0 — 2023-02-16
- 3005.162.3 — 2022-10-31
- … 422 more at https://npm.io/package/@springworks/error-factory/versions

## README

# `@springworks/error-factory`

Custom error that makes use of HTTP error codes to identify different error types.

```sh
yarn add @springworks/error-factory
```

```ts
import { createError } from '@springworks/error-factory';

const err = createError({ code: 404, message: 'Could not find user', cause: db_err });
```

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