Preflight checklist
Describe the bug
When a Go template references a value that is not available in its evaluation context, it can silently render as <no value> instead of failing.
For endpoint URLs or headers this may result in a syntactically valid but incorrect downstream request. The resulting 400/401 response then hides the actual configuration problem.
See #3495 for the context in which this was discovered.
Expected behavior: Missing or unavailable template values should cause rendering to fail with an actionable template error instead of silently producing <no value>.
How can the bug be reproduced
Configure an endpoint template with an unavailable value, e.g.:
endpoint:
url: http://api.internal/entitlements?tenantId={{ .Request.URL.Captures.tenantId }}
Execute the mechanism.
The rendered URL contains:
and the request is sent downstream instead of failing during template rendering.
Relevant log output
DBG Creating request _endpoint="http://api.internal/entitlements?tenantId=<no value>"
INF Pipeline step execution failed error="authorization error: authorization failed based on received response code: 400"
Relevant configuration
See reproduction above and #3495.
Version
v0.17.21
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Docker
Additional Context
Originally identified while investigating #3495.
Preflight checklist
Describe the bug
When a Go template references a value that is not available in its evaluation context, it can silently render as
<no value>instead of failing.For endpoint URLs or headers this may result in a syntactically valid but incorrect downstream request. The resulting
400/401response then hides the actual configuration problem.See #3495 for the context in which this was discovered.
Expected behavior: Missing or unavailable template values should cause rendering to fail with an actionable template error instead of silently producing
<no value>.How can the bug be reproduced
Configure an endpoint template with an unavailable value, e.g.:
Execute the mechanism.
The rendered URL contains:
and the request is sent downstream instead of failing during template rendering.
Relevant log output
Relevant configuration
Version
v0.17.21
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Docker
Additional Context
Originally identified while investigating #3495.