Skip to content

Durable Function activity failures are difficult to handle #572

@AnatoliB

Description

@AnatoliB

When an activity function fails because of an exception, this exception is not propagated to the orchestrator function. For example, the Invoke-ActivityFunction call below will not throw any exception, will not write anything to the Error stream, the orchestration function will continue execution, and the orchestration will reach the 'Completed' status.

Activity function (MyActivity):

throw 'Something is wrong'

Orchestrator function:

Invoke-ActivityFunction -FunctionName 'MyActivity'
...

As a result, there is no clean and simple way to handle failures. It is technically possible to check the activity function logs (as the exception will be reported there), or use other means to check for other side effects to understand whether the activity succeeded or not. However, these solutions are complicated and should be invented on the case-by-case basis. Instead, we should make Invoke-ActivityFunction report regular PowerShell errors and let the orchestrator function use regular PowerShell language constructs to handle these errors.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions