Jinja Syntax Errors in Stack Configs do not show the Stack Name in the Error Message
X-Guardian opened this issue · 0 comments
X-Guardian commented
Subject of the issue
If your Sceptre stack configs contain a Jinja syntax error then the error message on stack launch does not contain details of the stack config containing the error. This is particularly annoying when there is a large dependency tree on the stack that is being launched, and the Jinja error is deep within the tree.
Your environment
- version of sceptre
3.2.0
- version of python
3.8.8
- which OS/distro:
Windows 10
Steps to reproduce
dev/stack.yaml
template:
path: template1.yaml
parameters:
Parm1: {{ foo bar }}
Expected behaviour
The error message should contain details of the config file containing the Jinja error, i.e.
"dev/stack.yaml - expected token 'end of print statement', got 'bar'"
Actual behaviour
Only the Jinja error is currently output, i.e.
"expected token 'end of print statement', got 'bar'"
Solution
I am happy to raise a PR to improve this error message.