Azure / Azure/azure-functions-durable-python
Handling custom exception type from activities
- 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
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