diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-23 21:10:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-23 21:10:52 +0300 |
commit | abd2c6b32aabff4654b6be9cb98b59dcd3193fc4 (patch) | |
tree | fa4464b978bf45b40774bcea2e774b43f36aa27b /lib/api | |
parent | 118083ac69c8cba0bc60633a15b9bb44e5f78281 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/helpers.rb | 6 | ||||
-rw-r--r-- | lib/api/invitations.rb | 4 |
2 files changed, 8 insertions, 2 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 diff --git a/lib/api/invitations.rb b/lib/api/invitations.rb index d625b2c0fe6..09bb336e19c 100644 --- a/lib/api/invitations.rb +++ b/lib/api/invitations.rb @@ -73,7 +73,7 @@ module API end desc 'Updates a group or project invitation.' do - success Entities::Member + success Entities::Invitation tags %w[invitations] end params do @@ -103,7 +103,7 @@ module API updated_member = result[:members].first if result[:status] == :success - present_members updated_member + present_member_invitations updated_member else render_validation_error!(updated_member) end |