# woodwork-interceptor-error

> Used with woodwork-logger, handles Error's and exposes non-enumerable properties for you.

Latest version **0.0.4** (published 2021-12-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install woodwork-interceptor-error
pnpm add woodwork-interceptor-error
yarn add woodwork-interceptor-error
bun add woodwork-interceptor-error
```

## 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.4 |
| Published | 2021-12-08 |
| First published | 2020-12-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Alejandro Andersson |
| Maintainers | dawaa |
| Keywords | woodwork, woodwork-logger, woodwork-interceptor-error, logger, logging, logs, sysadmin, loglevel, tools, error |

## Links

- npm: https://www.npmjs.com/package/woodwork-interceptor-error
- Repository: https://github.com/dawaa/woodwork
- Issues: https://github.com/dawaa/woodwork/issues
- npm.io page: https://npm.io/package/woodwork-interceptor-error

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 0.0.4 (latest) — 2021-12-08
- 0.0.3 — 2020-12-10
- 0.0.2 — 2020-12-10
- 0.0.1 — 2020-12-10

## README

# `woodwork-interceptor-error`

## Table of Contents
- [Install](#install)
- [Example](#example)
- [API](#api)

## Install

```
npm install woodwork-interceptor-error
```

## Example

```js
const woodwork = require('woodwork-logger');
const woodworkInterceptorError = require('woodwork-interceptor-error');

const logger = woodwork.create('service-a', {
  interceptors: [
    woodworkInterceptorError(/* options */),
  ],
  request: (events) => { /* ... code */ },
});
```

## API

### `woodworkInterceptorError(options: Object): Function`

#### `options.getOwnproperties: Boolean` (default: `true`)
This is helpful to include any custom created properties on a custom Error object in the event.

#### `options.whitelist: Array` (default: `['message', 'name', 'stack']`)
Which properties should be included from the original Error object, which are non-enumerable and wouldn't otherwise be included.

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