Currently, when a pipeline fails in Harness, the default notification payloads (e.g., email, Slack) include a helpful errorMessage field that captures the cause of the failure, such as:
"errorMessage": "Shell Script execution failed. Please check execution logs."
However, when using custom notifications via JSON notification templates, this field is not available as a variable, preventing customers from including critical error context in their custom messages.
Feature Request:
Expose the errorMessage field in custom notification templates for the following failure types:
  • Step failure (eventType: StepFailed)
  • Stage failure (eventType: StageFailed)
  • Pipeline failure (eventType: PipelineFailed)
Use Case:
This enhancement would allow customers to build richer and more actionable custom alerts — especially for use cases where notification delivery is routed to internal tools, messaging platforms, or monitoring systems that rely on structured JSON.
Example:
In the default notification payload for a failed step, the following structure is provided:
{
"eventData": {
"pipelineName": "Simple Pipeline with Runtime Inputs",
"stepName": "ShellScript_1",
"eventType": "StepFailed",
"nodeStatus": "failed",
"errorMessage": "Shell Script execution failed. Please check execution logs.",
...
}
}
We would like to have the errorMessage field accessible in the custom notification template so we can include it in our Slack/webhook payloads.
Created by Pedro Mastelaro
·