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.rb3
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