[Backport v8] Show the GraphQL error messages in the error dialog again - #6204
Open
VPS-thodax wants to merge 1 commit into
Open
[Backport v8] Show the GraphQL error messages in the error dialog again#6204VPS-thodax wants to merge 1 commit into
VPS-thodax wants to merge 1 commit into
Conversation
`createErrorDialogApolloLink` only assigned the message of network errors, so a pure GraphQL error left `error` undefined and the dialog fell back to "Unknown error", hiding useful messages such as the message of a `BadRequestException` thrown by the API. The assignment was lost when the auth error conflicts were resolved while merging main into next before v7 (20eb0fa). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MoiP6Lrf8kQPGkpkjT637B
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #6187 to
v8.x.x.Original description
Problem
When a request fails with a GraphQL error, the error dialog shows
Unknown errorinstead of the actual message.Cause
createErrorDialogApolloLinkassignserroronly in thenetworkErrorbranch. ThegraphQLErrorsbranch setserrorTypebut nevererror, so the dialog falls back to "Unknown error".Fix
The link passes the messages of all GraphQL errors to the dialog again. Network errors are unchanged, and GraphQL errors take precedence over an accompanying network error, as the guard intended.
Backport notes
9731f9eontov8.x.x, no conflicts.v8.x.x:@comet/adminbuilds, lints (eslint/prettier/tsc) and its full test suite (68/68, including the 3 new regression tests) all pass.Generated by Claude Code