All Projects → chunkai1312 → express-error-slack

chunkai1312 / express-error-slack

Licence: MIT license
Express error handling middleware for reporting error to Slack

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to express-error-slack

errorist
Utilities for coping with errors and panics like a boss in Go
Stars: ✭ 19 (+35.71%)
Mutual labels:  error-handling
ngx-errors
Angular directives for displaying validation errors
Stars: ✭ 51 (+264.29%)
Mutual labels:  error-handling
SolveWithStack
Android library for helping you to reach out to best possible answer for your bug/error available on stack overflow and will show it in your Android Studio Console only.
Stars: ✭ 15 (+7.14%)
Mutual labels:  error-handling
bugsnag-java
Bugsnag error reporting for Java.
Stars: ✭ 51 (+264.29%)
Mutual labels:  error-handling
go-errors
⚠️ Better GoLang error handling.
Stars: ✭ 18 (+28.57%)
Mutual labels:  error-handling
rakered
The open source components from rake.red
Stars: ✭ 28 (+100%)
Mutual labels:  error-handling
catchr
catchr: Flexible, useful tools for dealing with conditions in R, for new users and veterans
Stars: ✭ 17 (+21.43%)
Mutual labels:  error-handling
koa-better-error-handler
A better error-handler for Lad and Koa. Makes `ctx.throw` awesome (best used with koa-404-handler)
Stars: ✭ 51 (+264.29%)
Mutual labels:  error-handling
ignition-stackoverflow
An Ignition tab that fetches StackOverflow questions and provides a searchbar.
Stars: ✭ 74 (+428.57%)
Mutual labels:  error-handling
redux-airbrake
Redux middleware for Airbrake error logging
Stars: ✭ 20 (+42.86%)
Mutual labels:  error-handling
bugsnag-vue
[DEPRECATED] This package now lives within the monorepo for our Universal JS notifier "@bugsnag/js" • https://github.com/bugsnag/bugsnag-js
Stars: ✭ 26 (+85.71%)
Mutual labels:  error-handling
sealed-monad
Scala library for nice business logic oriented, for-comprehension-style error handling
Stars: ✭ 16 (+14.29%)
Mutual labels:  error-handling
pony-cause
Ponyfill and helpers for the standardized Error Causes
Stars: ✭ 42 (+200%)
Mutual labels:  error-handling
react-ssr-error-boundary
No description or website provided.
Stars: ✭ 33 (+135.71%)
Mutual labels:  error-handling
co demo
A step-by-step guide about how to avoid callback hell with ES6 Promises + generators (aka make your own "co")
Stars: ✭ 17 (+21.43%)
Mutual labels:  error-handling
ddderr
👺 Reflection-free Domain-Driven errors for Go.
Stars: ✭ 29 (+107.14%)
Mutual labels:  error-handling
express-json-validator-middleware
Express middleware for validating requests against JSON schema
Stars: ✭ 148 (+957.14%)
Mutual labels:  express-middleware
elmah.io
ELMAH error logger for sending errors to elmah.io.
Stars: ✭ 31 (+121.43%)
Mutual labels:  error-handling
auto-async-wrap
automatic async middleware wrapper for expressjs errorhandler.
Stars: ✭ 21 (+50%)
Mutual labels:  error-handling
TrackJS-Node
TrackJS Error Monitoring agent for NodeJS
Stars: ✭ 26 (+85.71%)
Mutual labels:  error-handling

express-error-slack

NPM version Build Status Coverage Status

Express error handling middleware for reporting error to Slack

Install

$ npm install --save express-error-slack

Usage

const express = require('express')
const errorToSlack = require('express-error-slack')

const app = express()

// Route that triggers a error
app.get('/error', function (req, res, next) {
  const err = new Error('Internal Server Error')
  err.status = 500
  next(err)
})

// Send error reporting to Slack
app.use(errorToSlack({ webhookUri: 'https://hooks.slack.com/services/TOKEN' }))
app.listen(3000)

API

const errorToSlack = require('express-error-slack')

errorToSlack(options)

Create a error handling middleware to send error reporting to Slack channel.

Options

{
  webhookUri: String,
  skip: function (err, req, res) { 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 returning false.
  • debug: Optional. Show logging of response from Slack if set true. Defaults to false.

Result Example

4xx

Slack Message

5xx

Slack Message

License

MIT © Chun-Kai Wang

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].