Amazebot / bbot

An adaptable conversation engine for building bespoke bots.
MIT License
55 stars 2 forks source link

Errors don't exit, process hangs instead. #92

Closed timkinnane closed 6 years ago

timkinnane commented 6 years ago

The logger module, via Winston should be exiting on errors, (unless the error came from middleware). However even when logger.exitOnError is set true, the process does not exit after throwing an error.

Ideally I'd like to handle errors with a graceful shutdown, calling bot.shutdown(1) with the argument as the process.exit code, but allowing adapters to disconnect, leaving clean subscriptions and states with their associated providers.