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
path: root/lib
diff options
context:
space:
mode:
authorHeinrich Lee Yu <hleeyu@gmail.com>2018-10-19 08:55:06 +0300
committerStan Hu <stanhu@gmail.com>2018-10-19 08:55:06 +0300
commit880792a04eaed2409019d54961ecddd402d8471c (patch)
tree34bf5426273928cb20dd91913854dfb216c55fa3 /lib
parentb9cb0e1632d21860f0e36dc970e3318da632330f (diff)
Catch `RedirectionTooDeep` Exception in webhooks
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/http.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/gitlab/http.rb b/lib/gitlab/http.rb
index 9aca3b0fb26..538b51c0008 100644
--- a/lib/gitlab/http.rb
+++ b/lib/gitlab/http.rb
@@ -5,9 +5,16 @@
module Gitlab
class HTTP
BlockedUrlError = Class.new(StandardError)
+ RedirectionTooDeep = Class.new(StandardError)
include HTTParty # rubocop:disable Gitlab/HTTParty
connection_adapter ProxyHTTPConnectionAdapter
+
+ def self.perform_request(http_method, path, options, &block)
+ super
+ rescue HTTParty::RedirectionTooDeep
+ raise RedirectionTooDeep
+ end
end
end