Added rescue to show a custom error when testing project integrations
This commit is contained in:
parent
2e3bc6a941
commit
7143bb8852
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue