Azure / Azure/azure-functions-durable-python

Handling custom exception type from activities

Open
#229 2 comments 1 reaction 0 assignees View on GitHub
Enhancement fixed-in-v2 P2
Dominant language
Python
Stars
157
Forks
70
Avg merge
2d 10h
Merged PRs (30d)
2

Description

I would like to understand if it is possible to handle custom exception type (from activities) inside the orchestrator function.

E.g.:

Activity
```python
raise MyException(custom_data={...})
```
Orchestrator:
```python
try:
res = yield context.call_activity("Activity", data)
except MyException as me:
print(me.custom_data)
```

The actual behaviour is that in the orchestrator function I only get the generic Exception type and I cannot differentiate the handle logic based on custom_data.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Activity raising MyException and the orchestrator calling context.call_activity, then trace how the activity exception reaches the orchestrator. Done means determining whether the custom exception type and custom_data can be preserved for differentiated handling, and documenting or implementing the required behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
backend, cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.