Azure / Azure/azure-functions-durable-python
Handling custom exception type from activities
- Langage dominant
- Python
- Étoiles
- 157
- Forks
- 70
- Merge moyen
- 2 j 10 h
- PR mergées (30 j)
- 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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par reproduire l'Activity qui lève MyException et l'orchestrator qui appelle context.call_activity, puis suivez la manière dont l'exception de l'Activity atteint l'orchestrator. Le travail est terminé lorsqu'il a été déterminé si le type d'exception personnalisé et custom_data peuvent être préservés pour permettre un traitement différencié, et que le comportement requis a été documenté ou implémenté.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- azure, python
- Domaine
- backend, cloud
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- Calme
- Clarté
- À clarifier
- Accessibilité débutants
- 45/100