dingtalk-express-middleware
An express error middleware that will send error alert to Dingtalk bot.
Install
$ npm install dingtalk-express-middleware
How to use
All you need is a dingBot url. You should put this middleware before your last error handler.
const dingTalkExpress = ;app;
Note
- If you try catch your err in route handler, you should throw it out
- This middleware should put before your last error handler
- If your error object has status attribute and it's not 500, it will not send to dingBot
When an error is catched by the middleware you will got an alert.