Fix Amazon Q UUID mismatch error handling

What does this MR do and why?

Fix Amazon Q UUID mismatch error handling

When GitLab instance UUID changes (e.g., after restore/migration), Amazon Q offboarding fails with unhelpful generic error. This change:

  • Detects UUID mismatch from AI Gateway 401 responses
  • Returns structured error with specific error type
  • Shows clear error message with troubleshooting link
  • Adds comprehensive remediation steps to documentation

Changelog: other EE: true

References

Issue link here: https://gitlab.com/gitlab-com/ops-sub-department/aws-gitlab-ai-integration/integration-motion-planning/-/issues/633

Original troubleshooting documentation: https://gitlab.com/gitlab-com/ops-sub-department/aws-gitlab-ai-integration/integration-motion-planning/-/issues/594

Screenshots or screen recordings

Before After

image.png

image.png

How to set up and validate locally

  1. Onboard to Amazon Q as normal
  2. In rails console, reset the instance ID
    1. ApplicationSetting.update!(uuid: SecureRandom.uuid)
  3. Wait 1 minute, then synchronize with cloud connector in the Admin > Subscriptions settings
  4. Attempt to offboard Amazon Q

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Benson Wu

Merge request reports

Loading