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

Allow full error trace in Nunjucks #490

Merged
merged 1 commit into from
Jan 18, 2023

Conversation

pezholio
Copy link
Contributor

When a global function in a template throws an error, we don’t see the full trace of the error, which makes diagnosing issues really hard.

This makes use of the undocumented dev argument which allows us to see the cause of the error in our logs and in Sentry.

I’ve had to extend the nunjucks types to allow for this option to be set, as it’s not in the type definition in DefinitelyTyped. However, I’ve opened a PR to add this

When a global function in a template throws an error, we don’t see the
full trace of the error, which makes diagnosing issues really hard.

This makes use of the [undocumented dev argument](mozilla/nunjucks#1430)
which allows us to see the cause of the error in our logs and in Sentry.

I’ve had to extend the nunjucks types to allow for this option to be
set, as it’s not in the type definition in `DefinitelyTyped`. However,
I’ve [opened a PR to add this](DefinitelyTyped/DefinitelyTyped#63968)
@pezholio pezholio force-pushed the allow-full-trace-to-be-seen-in-nunjucks branch from 614b987 to 8eed08b Compare January 18, 2023 12:02
@richpjames
Copy link
Contributor

Is it worth adding this to the template? or maybe we should wait for the DefinitelyTyped PR to merge

@pezholio pezholio merged commit 5f20c2e into main Jan 18, 2023
@pezholio pezholio deleted the allow-full-trace-to-be-seen-in-nunjucks branch January 18, 2023 12:10
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.

2 participants