Commit 7143bb88 authored by Francisco Javier López's avatar Francisco Javier López Committed by Douwe Maan

Added rescue to show a custom error when testing project integrations

parent 2e3bc6a9
...@@ -46,6 +46,8 @@ class Projects::ServicesController < Projects::ApplicationController ...@@ -46,6 +46,8 @@ class Projects::ServicesController < Projects::ApplicationController
else else
{ error: true, message: 'Validations failed.', service_response: @service.errors.full_messages.join(',') } { error: true, message: 'Validations failed.', service_response: @service.errors.full_messages.join(',') }
end end
rescue Gitlab::HTTP::BlockedUrlError => e
{ error: true, message: 'Test failed.', service_response: e.message }
end end
def success_message def success_message
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment