Skip to content

Commit

Permalink
Report connection errors to sentry
Browse files Browse the repository at this point in the history
When the hutch runner fails due to a connection, authentication or worker
setup error, the exception is only logged.

With this change the exception is reported with all available error
handlers.

Closes #288
  • Loading branch information
Valentin Krasontovitsch committed Nov 9, 2017
1 parent 61abb51 commit f142774
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/hutch/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ def start_work_loop
@worker.run
:success
rescue ConnectionError, AuthenticationError, WorkerSetupError => ex
dummy_props = Class.new do
attr_accessor :message_id
end
Hutch::Config[:error_handlers].each do |backend|
backend.handle(dummy_props.new, {}, nil, ex)
end
logger.fatal ex.message
:error
end
Expand Down

0 comments on commit f142774

Please sign in to comment.