In Azure DevOps, I have some pipelines in yaml files that execute tasks in Terraform and Powershell to deploy infrastructures in Azure.
I would like to trigger a default action (like printing a default error message or delete somethings, etc.) if there is an error during the deployment, no matter if the error is from a Terraform script or Powershell.
I think that the Yaml file can handle this action, but how?