Skip to content

Improve error messages by including the path #356

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

simhnna
Copy link
Contributor

@simhnna simhnna commented Apr 7, 2025

Without the path users need to search all their code for a malformed path or debug to find the issue

Closes: #336

Without the path users need to search all their code for a malformed
path or debug to find the issue

Closes: pillarjs#336
@simhnna
Copy link
Contributor Author

simhnna commented Apr 7, 2025

Tried a couple of different places to include the path in the error message and I think prepending it is the easiest to read but if you'd like it somewhere else I'd update accordingly

Copy link
Member

@blakeembrey blakeembrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate this PR, it's a great direction! However I think it'd be good to avoid using stringify as it can output a different path to the original input, and instead add a originalPath or something to TokenData. I can open a PR you can review if that's OK?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve error message when parsing fails
2 participants