Provide Additional Info About the Template that Failed to Render
Proposal
Include at least the path to the template being rendered when logging out render failures.
Use-cases
Mainly focused on enabling better troubleshooting when templates go wrong :smile:
For tasks that have multiple template stanzas, troubleshooting which template failed to render can burn a decent amount of time.
Example of a failed template today:
Template failed: vault.read(<secret_path>): vault.read(<secret_path>): Error making API request.
Potentially helpful solution would be to include the path to the failed template in the beginning of the error:
Template **[path to template]** failed: vault.read(<secret_path>): vault.read(<secret_path>): Error making API request.
Attempted Solutions
Manually looking through potential directories and finding templates that contain mention of a particular Vault secret path.
Hi @Shackelford-Arden and thanks for the suggestion, I think this would be very useful. I took a quick look at the code, and I believe the error comes straight from consul-template, the backing library we use for template rendering. Therefore, the change would possibly need to be made there.
Hey @jrasell , appreciate the quick response here :smile:
Would you prefer then that I move this over to the consul-template project? Happy to do so if that's the preferred path for this request.
@jrasell Just checking in on this in regards to my last question :)
Hi @Shackelford-Arden if you could create this issue in the consul-template project that would be much appreciated.
I'll do you one better and transfer this issue there.