Skip to content

Commit

Permalink
Merge pull request #490 from ministryofjustice/allow-full-trace-to-be…
Browse files Browse the repository at this point in the history
…-seen-in-nunjucks

Allow full error trace in Nunjucks
  • Loading branch information
pezholio authored Jan 18, 2023
2 parents 4092c55 + 8eed08b commit 5f20c2e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions server/@types/nunjucks/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default {}

declare module 'nunjucks' {
export interface ConfigureOptions {
dev?: boolean | undefined
}
}
1 change: 1 addition & 0 deletions server/utils/nunjucksSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export default function nunjucksSetup(app: express.Express, path: pathModule.Pla
{
autoescape: true,
express: app,
dev: true, // This is set to true to allow us to see the full stacktrace from errors in global functions, otherwise it gets swallowed and tricky to see in logs
},
)

Expand Down

0 comments on commit 5f20c2e

Please sign in to comment.