diff options
author | Heinrich Lee Yu <hleeyu@gmail.com> | 2018-10-19 05:55:06 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-10-19 05:55:06 +0000 |
commit | 880792a04eaed2409019d54961ecddd402d8471c (patch) | |
tree | 34bf5426273928cb20dd91913854dfb216c55fa3 /lib/gitlab/http.rb | |
parent | b9cb0e1632d21860f0e36dc970e3318da632330f (diff) | |
download | gitlab-ce-880792a04eaed2409019d54961ecddd402d8471c.tar.gz |
Catch `RedirectionTooDeep` Exception in webhooks
Diffstat (limited to 'lib/gitlab/http.rb')
-rw-r--r-- | lib/gitlab/http.rb | 7 |
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 |