express-error-slack
Express error handling middleware for reporting error to Slack
Install
$ npm install --save express-error-slack
Usage
const express = const errorToSlack = const app = // Route that triggers a errorapp // Send error reporting to Slackappapp
API
const errorToSlack =
errorToSlack(options)
Create a error handling middleware to send error reporting to Slack channel.
Options
webhookUri: String { return false } debug: Boolean
webhookUri
: Required. Your Slack webhook uri that the channel will receive error reporting.skip
: Optional. A function to determine if handler is skipped. Defaults to always returningfalse
.debug
: Optional. Show logging of response from Slack if set true. Defaults tofalse
.
Result Example
4xx
5xx
License
MIT © Chun-Kai Wang