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

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.