If I have an orchestrator that calls an activity which throws an exception, MSSQL and DTS behave differently from AzureStorage backend.
In the AzureStorage backend I get the message that the activity threw in the orchestrator.
In MSSQL/DTS, I only get
One or more errors occurred. (Task 'RaiseException' (#0) failed with an unhandled exception: )
Orchestrator code:
param($Context)
try {
$output = Invoke-DurableActivity -FunctionName 'RaiseException' -Input $Context.InstanceId
$output
}
catch {
# Here is where the behavior change happens
$_.Exception.Message
}
Activity code:
param($InstanceId)
throw [System.InvalidOperationException]::new("This activity failed")