Skip to content

Commit 2fbafbf

Browse files
committed
Improve Durable JSON serialization error messages
1 parent f07d7f4 commit 2fbafbf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

azure/functions/durable_functions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ def encode(cls, obj: typing.Any, *,
115115
try:
116116
callback = _durable_functions._serialize_custom_object
117117
result = json.dumps(obj, default=callback)
118-
except TypeError:
118+
except TypeError as e:
119119
raise ValueError(
120-
f'activity trigger output must be json serializable ({obj})')
120+
f'activity trigger output must be json serializable ({obj})') from e
121121

122122
return meta.Datum(type='json', value=result)
123123

0 commit comments

Comments
 (0)