Error 500 on webhook test to unreachable url
Created by: KevinRausch
Originally posted under #6327 which was closed as duplicate, but my issue does not relate to repo being empty.
It seems the error 500 happens when GitLab cannot connect to the webhook url being tested (unresolvable or service down). Here's my reproduction steps on 7.1.0:
Add hook to valid url http://requestb.in/15u7k8d1 (expired now, use new link) Test Hook >> OK
Add hook to invalid url http://requestb.com/15u7k8d1 Test Hook >> Error 500
Started GET "/vizon/cc/hooks/18/test" for ********** at 2014-07-25 05:11:14 -0700
Processing by Projects::HooksController#test as HTML
Parameters: {"project_id"=>"vizon/cc", "id"=>"18"}
Completed 500 Internal Server Error in 71ms
SocketError (getaddrinfo: Name or service not known):
app/models/web_hook.rb:34:in `execute'
app/services/test_hook_service.rb:4:in `execute'
app/controllers/projects/hooks_controller.rb:27:in `test'