diff options
author | Francisco Javier López <fjlopez@gitlab.com> | 2018-03-29 09:23:47 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2018-04-02 18:20:18 +0300 |
commit | 7143bb88522db4784be6b593083061a104d4b630 (patch) | |
tree | 344a99509fe8646b044aacfd9818467ba29cdafe /app/controllers/projects/services_controller.rb | |
parent | 2e3bc6a9415688d769134ee669fd457d63f497f8 (diff) |
Added rescue to show a custom error when testing project integrations
Diffstat (limited to 'app/controllers/projects/services_controller.rb')
-rw-r--r-- | app/controllers/projects/services_controller.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/projects/services_controller.rb b/app/controllers/projects/services_controller.rb index f14cb5f6a9f..a5ea9ff7ed7 100644 --- a/app/controllers/projects/services_controller.rb +++ b/app/controllers/projects/services_controller.rb @@ -46,6 +46,8 @@ class Projects::ServicesController < Projects::ApplicationController else { error: true, message: 'Validations failed.', service_response: @service.errors.full_messages.join(',') } end + rescue Gitlab::HTTP::BlockedUrlError => e + { error: true, message: 'Test failed.', service_response: e.message } end def success_message |