Skip to content

Commit

Permalink
Fail harder on errors
Browse files Browse the repository at this point in the history
Currently if the client emits an error we log it but just hang around.
The app is in an undefined state at that point so it's hard to say
what exactly will happen, but it's probably not ideal.

At least this way a process monitor can tell that it died and restart
it, ship the logs somewhere, or something.
  • Loading branch information
evansolomon committed Dec 10, 2014
1 parent 12c1f5e commit 107752f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/slack.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class SlackBot extends Adapter

error: (error) =>
@robot.logger.error "Received error #{error.toString()}"
@robot.logger.error error.stack
process.exit 1

loggedIn: (self, team) =>
@robot.logger.info "Logged in as #{self.name} of #{team.name}, but not yet connected"
Expand Down

0 comments on commit 107752f

Please sign in to comment.