Improve Transparency of GitLab Duo Error Messages

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Proposal

Improve GitLab Duo Error Messaging Transparency and User Experience

Currently, GitLab Duo returns generic error messages with codes like A1004 ("I'm sorry, I couldn't respond in time. Please try again. Error code: A1004") for various underlying issues including prompt length limits, token context limits, rate limiting, and network connectivity problems. This creates significant user confusion and frustration, as users cannot understand the specific cause of their issue or take appropriate corrective action without contacting support.

This feature request proposes implementing specific, actionable error messages that replace generic A100X error codes with clear explanations of the underlying issue:

Current Behavior:

  • All errors return generic "Error code: A1004" message
  • Users must use /reset command and lose conversation context
  • No indication of what caused the error or how to resolve it
  • Results in increased support tickets and user frustration

Proposed Behavior:

Replace backend error mapping to show specific user-friendly messages:

  • Prompt too long errors: "Your prompt exceeds the maximum length limit. Please reduce the input size or break it into smaller chunks."
  • Token limit exceeded: "The conversation has reached the token context limit (200,000 tokens). Please start a new chat or use /reset to continue."
  • Rate limit errors: "Rate limit exceeded due to high usage. Please wait a moment before submitting another request."
  • Network timeout errors: "Connection timeout occurred. Please check your network connection and try again."

Results for customers:

  • Clear understanding of error causes without requiring support tickets
  • Ability to self-resolve issues through informed actions
  • Reduced frustration from losing conversation context unnecessarily
  • Better awareness of GitLab Duo capabilities and limitations
  • Improved user experience similar to other AI tools (GitHub Copilot reference provided)

Success Metrics:

  • Reduction in A100X-related support tickets
  • Decreased usage of /reset command for recoverable errors
  • Improved user satisfaction scores for GitLab Duo
  • Increased successful prompt completion rates

This enhancement is particularly important for GitLab Dedicated customers and enterprise users who rely on GitLab Duo as their recommended AI solution and expect transparent, actionable error messaging. For reference, a Gitlab Dedicated customer recently noted that GitHub CoPilot offers more transparent error messages than Duo does. We should aim to beat GitHub's transparency on this topic.

Related issues:

Related documentation:

Related tickets (internal only):

Edited by 🤖 GitLab Bot 🤖