From cd92e0ff989f38f028fd3ee8d27e0fb1d21f7362 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 17 Aug 2023 12:09:15 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- lib/api/helpers.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/api/helpers.rb') diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index e1207e7e222..b7f21bd6c22 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -757,6 +757,9 @@ module API @initial_current_user = Gitlab::Auth::UniqueIpsLimiter.limit_user! { find_current_user! } rescue Gitlab::Auth::UnauthorizedError unauthorized! + + # Explicitly return `nil`, otherwise an instance of `Rack::Response` is returned when reporting an error + nil end end # rubocop:enable Gitlab/ModuleWithInstanceVariables -- cgit v1.2.3