diff options
author | Alexander Randa <randa.alex@gmail.com> | 2017-07-20 18:12:06 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-07-20 18:12:06 +0300 |
commit | e0ab5618a0998175df9f90c95ebd35d7afa01db7 (patch) | |
tree | 91cfff5c3c9f6a118d69df5e2816b7461ce2ccc5 /app/services/web_hook_service.rb | |
parent | 020b6a0be06614815d96854084f3dcafeefcf0b7 (diff) |
Wrong data type when testing webhooks
Diffstat (limited to 'app/services/web_hook_service.rb')
-rw-r--r-- | app/services/web_hook_service.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/app/services/web_hook_service.rb b/app/services/web_hook_service.rb index 4241b912d5b..a5110a23cad 100644 --- a/app/services/web_hook_service.rb +++ b/app/services/web_hook_service.rb @@ -39,7 +39,11 @@ class WebHookService execution_duration: Time.now - start_time ) - [response.code, response.to_s] + { + status: :success, + http_status: response.code, + message: response.to_s + } rescue SocketError, OpenSSL::SSL::SSLError, Errno::ECONNRESET, Errno::ECONNREFUSED, Net::OpenTimeout => e log_execution( trigger: hook_name, @@ -52,7 +56,10 @@ class WebHookService Rails.logger.error("WebHook Error => #{e}") - [nil, e.to_s] + { + status: :error, + message: e.to_s + } end def async_execute |