Azure / Azure/azure-functions-durable-powershell
Activities that throw exceptions in non-"Azure Storage" do not return exception message in orchestrators
- Dominant language
- C#
- Stars
- 9
- Forks
- 14
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 5
Description
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:
```powershell
param($Context)
try {
$output = Invoke-DurableActivity -FunctionName 'RaiseException' -Input $Context.InstanceId
$output
}
catch {
# Here is where the behavior change happens
$_.Exception.Message
}
```
Activity code:
```powershell
param($InstanceId)
throw [System.InvalidOperationException]::new("This activity failed")
```
Contributor guide
Research direction
Reproduce the issue with the shown PowerShell orchestrator and RaiseException activity, comparing Azure Storage with MSSQL and DTS. Start by tracing how each backend propagates activity failures into the orchestrator catch block. Done means MSSQL and DTS expose the activity's "This activity failed" message consistently with Azure Storage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100