I have a runbook that is called multiple times from ADF but with different parameters. What it does is that it just refresh different analysis services. I use the web activity in ADF
With POST method and in the Body i state which analysis service i want to refresh.
Here is the code for the runbook:
The runbook says that all jobs is completed
But one of them have actually failed:
Does anyone know how i can catch this error? Now i have no way of knowing that this has failed, except for going in to every job and look in details.
Does anyone know how i can catch this error? Now i have no way of knowing that this has failed, except for going in to every job and look in details.
Alternatively,There is another way to get to know the errors using Inbuilt queries in Logs Section Of Automation Account.
You can use below query which I have taken from Microsoft-Document:
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.AUTOMATION" and Category == "JobStreams" and StreamType_s == "Error"
| project TimeGenerated , RunbookName_s , StreamType_s , _ResourceId , ResultDescription , JobId_g
Error is in Result description:
Note( to get logs of jobs you need to enable logging and tracing in inside the runbook):