Draft: Improve error messages for Explain code feature
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 |
---|---|
How to set up and validate locally
- Enable the following feature flags:
explain_code
explain_code_snippet
openai_experimentation
ai_experimentation_api
- Add an OpenAI API key by following the steps in !116364 (merged)
- Cause Explain Code GraphQL subscription to respond with an error.
- For example, requesting to Explain code with too many tokens (4.5k_tokens.c).
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #408488 (closed)
Edited by Jacques Erasmus