-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix error message generation (#10411)
* Fix error message generation ApolloError.graphQLErrors is typed as an array of GraphQLError in typescript, but it can actually contain any value at runtime, including null. This is even explicitly tested: https://github.com/apollographql/apollo-client/blob/caba6c191dcb7bee265d62aba131727c5536f4ef/src/core/__tests__/QueryManager/index.ts#L369-L376 This PR simplifies error message generation, and prevents ever creating the string 'undefined' as an error message. See: #10394 * fix: handle protocolErrors * chore: add changeset --------- Co-authored-by: alessia <alessia@apollographql.com>
- Loading branch information
Showing
2 changed files
with
16 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@apollo/client": patch | ||
--- | ||
|
||
Simplify error message generation and make 'undefined' an impossible message string. |
This file contains 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