Skip to content
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

Production builds have error messages with much whitespace inside errors #3398

Closed
eweilow opened this issue May 3, 2018 · 3 comments
Closed
Labels
📚 good-first-issue Issues that are suitable for first-time contributors. 🐞 bug ✔ confirmed 🙏 help-wanted

Comments

@eweilow
Copy link

eweilow commented May 3, 2018

Intended outcome:

I'd expect to not have much whitespace inside errors for production, even though it's good for debugging 👍

Actual outcome:

For instance, this error:

throw new Error(`The inline argument "${name.value}" of kind "${
(value as any).kind
}" is not supported.
Use variables instead of inline arguments to overcome this limitation.`);

Cause the following code to be output:

throw new Error('The inline argument "'+t.value+'" of kind "'+r.kind+'" is not supported.\n                    Use variables instead of inline arguments to overcome this limitation.');

How to reproduce the issue:

Should be just a matter of building a project where apollo-client is used.

Version

  • apollo-client@2.2.8
@ghost ghost added the good first issue label May 3, 2018
@hwillson hwillson added 📚 good-first-issue Issues that are suitable for first-time contributors. and removed good first issue labels May 10, 2018
@reyhansofian
Copy link

hi, can I take this issue?

@hwillson
Copy link
Member

The error message in the source was mangled a bit by prettier. We'd love a PR here that fixes the formatting of the error message, to get rid of the extra whitespace. This can just be as simple as removing the white space in the source, while keeping the message wrapped at 80 chars (in the source only - the 80 char limit doesn't need to be preserved at runtime). Thanks!

@hwillson
Copy link
Member

Addressed in #3593 - thanks!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
📚 good-first-issue Issues that are suitable for first-time contributors. 🐞 bug ✔ confirmed 🙏 help-wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants