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/middleware/read_only/controller.rb')
-rw-r--r--lib/gitlab/middleware/read_only/controller.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/middleware/read_only/controller.rb b/lib/gitlab/middleware/read_only/controller.rb
index 65c08664a2b..69e2ae55cb0 100644
--- a/lib/gitlab/middleware/read_only/controller.rb
+++ b/lib/gitlab/middleware/read_only/controller.rb
@@ -83,7 +83,11 @@ module Gitlab
end
def route_hash
- @route_hash ||= Rails.application.routes.recognize_path(request_url, { method: request.request_method }) rescue {}
+ @route_hash ||= begin
+ Rails.application.routes.recognize_path(request_url, { method: request.request_method })
+ rescue StandardError
+ {}
+ end
end
def request_url