From abd2c6b32aabff4654b6be9cb98b59dcd3193fc4 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 23 Jan 2024 18:10:52 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- lib/api/helpers.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/api/helpers.rb') 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 -- cgit v1.2.3