Skip to content

Commit efa6321

Browse files
authored
Handle exceptions when no message is present (#530)
* Handle exceptions when no message is present - Pass string form of the exception type to WebJobs extension instead
1 parent 74d9181 commit efa6321

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

azure/durable_functions/models/TaskOrchestrationExecutor.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,12 +286,18 @@ def get_orchestrator_state_str(self) -> str:
286286
self.output = None
287287
self.exception = e
288288

289+
exception_str = None
290+
if self.exception is not None:
291+
exception_str = str(self.exception)
292+
if not exception_str:
293+
exception_str = str(type(self.exception))
294+
289295
state = OrchestratorState(
290296
is_done=self.orchestration_invocation_succeeded,
291297
actions=self.context._actions,
292298
output=self.output,
293299
replay_schema=self.context._replay_schema,
294-
error=None if self.exception is None else str(self.exception),
300+
error=exception_str,
295301
custom_status=self.context.custom_status
296302
)
297303

0 commit comments

Comments
 (0)