diff --git a/.rubocop.yml b/.rubocop.yml index 0b53b1fb7e8db646bbe2c6129252d6a923869636..0b470abd7d329869ce538688266e031d9e17ea5f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -122,10 +122,6 @@ Lint/OutOfRangeRegexpRef: Lint/MissingSuper: Enabled: false -Lint/ConstantDefinitionInBlock: - AllowedMethods: - - when_ready - Style/BlockDelimiters: EnforcedStyle: semantic AllowBracesOnProceduralOneLiners: true diff --git a/bin/sim_job b/bin/sim_job index 0a2cdc47c233549779ba06bbc3bee4ab91db562d..aa1d70076b90c9b35015fe3fabddafb64614678d 100755 --- a/bin/sim_job +++ b/bin/sim_job @@ -275,9 +275,10 @@ EM.run do }.catch { |e| LOG.error e - if e.is_a?(::Exception) + case e + when :Exception Sentry.capture_exception(e) - elsif e.is_a?(EM::HttpClient) + when EM::HttpClient LOG.error e.response_header Sentry.capture_message( "HTTP Error: #{e.response_header.http_status} @ #{e.last_effective_url}"