diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2019-05-11 00:12:33 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2019-05-13 21:27:41 +0300 |
commit | 4c2f6814907f3988c86c9f79a155d1d48ba61793 (patch) | |
tree | eee0368269fc9065c81bb767d6df60b35fa02891 /spec/requests | |
parent | 9dc41a0993a38f99eeda9c2e8bb3ace070003496 (diff) |
Add correlation id to all sentry errors
Before this, we were only adding the correlation id to the "acceptable
exceptions" which we handle in code.
But we need to add it to the default raven context so the information
would be available for uncaught exceptions.
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/helpers_spec.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/requests/api/helpers_spec.rb b/spec/requests/api/helpers_spec.rb index 25a312cb734..ed907841bd8 100644 --- a/spec/requests/api/helpers_spec.rb +++ b/spec/requests/api/helpers_spec.rb @@ -247,9 +247,8 @@ describe API::Helpers do exception = RuntimeError.new('test error') allow(exception).to receive(:backtrace).and_return(caller) - expect(Raven).to receive(:capture_exception).with(exception, tags: { - correlation_id: 'new-correlation-id' - }, extra: {}) + expect(Raven).to receive(:capture_exception).with(exception, tags: + a_hash_including(correlation_id: 'new-correlation-id'), extra: {}) Labkit::Correlation::CorrelationId.use_id('new-correlation-id') do handle_api_exception(exception) |