woodwork-interceptor-error

0.0.4 • Public • Published

woodwork-interceptor-error

Table of Contents

Install

npm install woodwork-interceptor-error

Example

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.

Package Sidebar

Install

npm i woodwork-interceptor-error

Weekly Downloads

1

Version

0.0.4

License

MIT

Unpacked Size

3.08 kB

Total Files

4

Last publish

Collaborators

  • dawaa