We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a95501a commit e8c3c0fCopy full SHA for e8c3c0f
durabletask/task.py
@@ -302,8 +302,10 @@ def stack_trace(self) -> Optional[str]:
302
class TaskFailedError(Exception):
303
"""Exception type for all orchestration task failures."""
304
305
- def __init__(self, message: str, details: pb.TaskFailureDetails):
+ def __init__(self, message: str, details: Union[pb.TaskFailureDetails, Exception]):
306
super().__init__(message)
307
+ if isinstance(details, Exception):
308
+ details = pbh.new_failure_details(details)
309
self._details = FailureDetails(
310
details.errorMessage,
311
details.errorType,
0 commit comments