# error-plus

> Simple extension to standard Node.js Error object that allows you to pass an addition object to the constructor whose keys will be added to the Error object.

Latest version **0.0.1** (published 2014-05-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install error-plus
pnpm add error-plus
yarn add error-plus
bun add error-plus
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2014-05-10 |
| First published | 2014-05-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Luke Bond |
| Maintainers | lukebond |
| Keywords | error, wrap, wrapper, plus |

## Links

- npm: https://www.npmjs.com/package/error-plus
- Repository: https://github.com/lukebond/_error
- Issues: https://github.com/lukebond/_error/issues
- npm.io page: https://npm.io/package/error-plus

## Alternatives

- [@sentry/react-native](https://npm.io/package/@sentry/react-native.md) — 2.6M weekly downloads
- [@ardatan/aggregate-error](https://npm.io/package/@ardatan/aggregate-error.md) — 708.1K weekly downloads
- [custom-error-generator](https://npm.io/package/custom-error-generator.md) — 2.0K weekly downloads
- [@technik-sde/prosemirror-recreate-transform](https://npm.io/package/@technik-sde/prosemirror-recreate-transform.md) — 1.5K weekly downloads
- [@suchipi/error-utils](https://npm.io/package/@suchipi/error-utils.md) — 78 weekly downloads

## Recent versions

- 0.0.1 (latest) — 2014-05-10

## README

# _error

A simple extension to the Node.js built-in Error object to allow you to pass an object to the constructor whose keys will be put into the Error object.

## Usage

Perhaps you currently do this:

```
var err = new Error('Something bad happened');
err.statusCode = 400;
err.pertinentInformation = 'something';
return callback(err);
```

Now you can now do this:
```
var _Error = require('error-plus');
return callback(new _Error('Something bad happened', {statusCode: 400, pertinentInformation: 'something'}));
```

That's all there is to it.

Tests are included.

### Licence

MIT

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