Microsoft ADF has a set of apis to get the status of a pipeline run.
Ref: https://learn.microsoft.com/en-us/rest/api/datafactory/pipeline-runs/get
In the response, there is an attribute called message
.
message | string | The message from a pipeline run.
How can I set this attribute in the pipeline?
You will have to set it to activity to be able to access the error message from activity and assign it to a variable as below.
For more information follow this link.