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/gitlab/query_limiting/middleware.rb')
-rw-r--r--lib/gitlab/query_limiting/middleware.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/query_limiting/middleware.rb b/lib/gitlab/query_limiting/middleware.rb
index 76de547b14f..0ee700caf5b 100644
--- a/lib/gitlab/query_limiting/middleware.rb
+++ b/lib/gitlab/query_limiting/middleware.rb
@@ -46,7 +46,11 @@ module Gitlab
def action_for_grape(env)
endpoint = env[ENDPOINT_KEY]
- route = endpoint.route rescue nil
+ route = begin
+ endpoint.route
+ rescue StandardError
+ nil
+ end
"#{route.request_method} #{route.path}" if route
end