Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index a59734d643d..9b2c6c37fd6 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -738,6 +738,12 @@ module API
namespace: namespace,
project: project
)
+ rescue Gitlab::InternalEvents::UnknownEventError => e
+ Gitlab::ErrorTracking.track_exception(e, event_name: event_name)
+
+ # We want to keep the error silent on production to keep the behavior
+ # consistent with StandardError rescue
+ unprocessable_entity!(e.message) if Gitlab.dev_or_test_env?
rescue StandardError => e
Gitlab::ErrorTracking.track_and_raise_for_dev_exception(e, event_name: event_name)
end