Skip to content

Show more details for testing integration error

What does this MR do and why?

Add service_response to error shown to user which gives more details to the user on how to fix the current issue.

Screenshots or screen recordings

Before After
Integrations_error_message_before Integrations_error_message_after

How to set up and validate locally

  1. Go to Project > Settings > Integrations > Datadog. For example, http://127.0.0.1:3000/gitlab-org/gitlab-shell/-/settings/integrations/datadog/edit.
  2. Fill in some dummy data in the site field` and apply this diff to simulate errors from the backend.
diff --git a/app/controllers/projects/settings/integrations_controller.rb b/app/controllers/projects/settings/integrations_controller.rb
index 443274608e3..92cb1d3fd96 100644
--- a/app/controllers/projects/settings/integrations_controller.rb
+++ b/app/controllers/projects/settings/integrations_controller.rb
@@ -90,7 +90,7 @@ def integration_test_response
           return {
             error: true,
             message: s_('Integrations|Connection failed. Please check your settings.'),
-            service_response: result[:message].to_s,
+            service_response: 'Ensure the project has CI pipelines.',
             test_failed: true
           }
         end
  1. Click Test settings.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #360923 (closed)

Edited by Justin Ho Tuan Duong

Merge request reports

Loading