Skip to content

Add original path to error messages #363

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 2 commits into
base: master
Choose a base branch
from

Conversation

blakeembrey
Copy link
Member

Closes #336, #358, #356, and #354.

Adds originalPath to TokenData, which will be used (when available) for the error messages. It's already added to any methods that input a string.

@blakeembrey blakeembrey requested a review from a team May 10, 2025 18:02
@blakeembrey blakeembrey force-pushed the be/debug-original-path branch from b25a26b to 3f25805 Compare May 10, 2025 18:03
*/
function errorMessage(message: string, originalPath: string | undefined) {
if (originalPath) {
return `${message}: ${originalPath}; visit ${DEBUG_URL} for more info`;
Copy link
Member Author

Choose a reason for hiding this comment

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

Not tied to this format, happy to get other opinions. Another PR used ${originalPath}: ${message} format instead.

Copy link
Contributor

@bjohansebas bjohansebas left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@UlisesGascon UlisesGascon left a comment

Choose a reason for hiding this comment

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

LGTM!

@UlisesGascon UlisesGascon requested a review from a team May 11, 2025 08:43
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
3 participants