Fix Amazon Q UUID mismatch error handling
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
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 |
|---|---|
How to set up and validate locally
- Onboard to Amazon Q as normal
- In rails console, reset the instance ID
ApplicationSetting.update!(uuid: SecureRandom.uuid)
- Wait 1 minute, then synchronize with cloud connector in the Admin > Subscriptions settings
- 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

