Skip to content

Draft: Improve error messages for Explain code feature

Jacques Erasmus requested to merge 408488-show-graphql-errors into master

What does this MR do and why?

Displays more specific error messages instead of a generic error message when the response contains an error.

This should help guide the user better.

Screenshots or screen recordings

before after
Screenshot_2023-04-25_at_11.13.16 Screenshot_2023-04-25_at_11.12.53

How to set up and validate locally

  1. Enable the following feature flags:
    • explain_code
    • explain_code_snippet
    • openai_experimentation
    • ai_experimentation_api
  2. Add an OpenAI API key by following the steps in !116364 (merged)
  3. Cause Explain Code GraphQL subscription to respond with an error.
    • For example, requesting to Explain code with too many tokens (4.5k_tokens.c).
  4. A popup should appear containing the error message from OpenAI.

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 #408488 (closed)

Edited by Jacques Erasmus

Merge request reports