Skip to content
Snippets Groups Projects
Commit ad6487ce authored by Rémy Coutable's avatar Rémy Coutable
Browse files

Merge branch 'log_webhook_timeout' into 'master'

Log web hook execution timeout events

See merge request !13134
parents 44167f5c a94e91a4
No related branches found
No related tags found
No related merge requests found
Loading
@@ -44,7 +44,7 @@ class WebHookService
Loading
@@ -44,7 +44,7 @@ class WebHookService
http_status: response.code, http_status: response.code,
message: response.to_s message: response.to_s
} }
rescue SocketError, OpenSSL::SSL::SSLError, Errno::ECONNRESET, Errno::ECONNREFUSED, Net::OpenTimeout => e rescue SocketError, OpenSSL::SSL::SSLError, Errno::ECONNRESET, Errno::ECONNREFUSED, Errno::EHOSTUNREACH, Net::OpenTimeout, Net::ReadTimeout => e
log_execution( log_execution(
trigger: hook_name, trigger: hook_name,
url: hook.url, url: hook.url,
Loading
Loading
Loading
@@ -53,7 +53,7 @@ describe WebHookService do
Loading
@@ -53,7 +53,7 @@ describe WebHookService do
end end
   
it 'handles exceptions' do it 'handles exceptions' do
exceptions = [SocketError, OpenSSL::SSL::SSLError, Errno::ECONNRESET, Errno::ECONNREFUSED, Net::OpenTimeout] exceptions = [SocketError, OpenSSL::SSL::SSLError, Errno::ECONNRESET, Errno::ECONNREFUSED, Errno::EHOSTUNREACH, Net::OpenTimeout, Net::ReadTimeout]
exceptions.each do |exception_class| exceptions.each do |exception_class|
exception = exception_class.new('Exception message') exception = exception_class.new('Exception message')
   
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment