From 83aa0ea8230018d37f2a0ad562418c3114b6fa81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Trzci=C5=84ski?= Date: Wed, 28 Nov 2018 18:02:23 +0100 Subject: Refactor Sentry handling --- lib/api/helpers.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/api/helpers.rb') diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 6c1a730935a..f0f8d2b3ce1 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -372,8 +372,9 @@ module API def handle_api_exception(exception) if report_exception?(exception) define_params_for_grape_middleware - Gitlab::Sentry.context(current_user) - Gitlab::Sentry.track_acceptable_exception(exception, extra: params) + Gitlab::Sentry.in_context(current_user) do + Gitlab::Sentry.report_exception(exception, extra: params) + end end # lifted from https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#L60 -- cgit v1.2.1