-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove "[GraphQL|Network] error" from error messages #3892
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @lorensr - it looks like you might have prettier (or similar) rules in place that conflict with the defaults used by Apollo Client. Can you update this PR to revert all styling back to the defaults used by AC? For example, semi-colons are being stripped when we'd like them to be preserved. Thanks!
Codecov Report
@@ Coverage Diff @@
## master #3892 +/- ##
=======================================
Coverage 89.14% 89.14%
=======================================
Files 43 43
Lines 2358 2358
Branches 575 552 -23
=======================================
Hits 2102 2102
Misses 240 240
Partials 16 16
Continue to review full report at Codecov.
|
Oops, thanks—the commit hook got me! It's working for me after adding |
@benjamn Totally agree - this has thrown me off multiple times. Noted and I'll take care of it shortly (unless you beat me to it). Thanks! |
Just re-visiting this a bit @benjamn; if we drop the |
Just as a flag, Node.js usually flags changes to error |
That's a really great point @abernix. People could be relying on the error |
Will this will be merged soon? |
Any updates here? This would be really valuable in displaying errors much more efficiently. Thanks! |
Any updates on this? |
`ApolloError` already provides a way to differentiate between GraphQL and network errors (via its public `graphQLErrors` and `networkError` properties), so let's get the extra details out of the error message string itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much for kickstarting this @lorensr!
Implements FR: apollographql/apollo-feature-requests#46
For consistency, strips the prefix from both GraphQL and Network errors. See "Stripping prefix" in #1812 (comment)