Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add receive_error event if middleware throws error #1425

Merged
merged 1 commit into from
Oct 19, 2018

Conversation

mkilp
Copy link
Contributor

@mkilp mkilp commented Jul 23, 2018

Previously, if an error occurred in the receive middleware, the message would just get swallowed and not processed. The error is just logged to console. Now an actual event is fired which can be caught in a skill.

  • CoreBot.js: firing receive_error event with the error message of the middleware
  • Error can be caught by using controller.on('receive_error', function(err, bot, message){[HANDLE THE ERROR...]});

Previously, if an error occurred in the receive middleware, the message would just get swallowed and not processed. The error is just logged to console. Now an actual event is fired which can be caught in a skill.

- CoreBot.js: firing receive_error event with the error message of the middleware
- Error can be caught by using `controller.on('receive_error', function(err, bot, message){[HANDLE THE ERROR...]});`
mkilp added a commit to mkilp/botkit-docs that referenced this pull request Jul 23, 2018
Update the core docs to explain how to handle errors in receive middlewares.

Related to howdyai/botkit#1425
@peterswimm peterswimm requested a review from benbrown July 25, 2018 18:36
@benbrown
Copy link
Contributor

This is merged into my next release branch!

@benbrown benbrown merged commit d52167b into howdyai:master Oct 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants