diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-17 15:09:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-17 15:09:15 +0300 |
commit | cd92e0ff989f38f028fd3ee8d27e0fb1d21f7362 (patch) | |
tree | b27854c43f5f5c4a0e71fc6c756b83c55ae543b4 /lib/api/helpers.rb | |
parent | d0ed973bd7c3a5c79c2bf9673d9d7260f91dd961 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r-- | lib/api/helpers.rb | 3 |
1 files changed, 3 insertions, 0 deletions
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 |