Skip to content

Commit 9b5a8a9

Browse files
committed
log json serialization failures
1 parent 946052b commit 9b5a8a9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

spyne/store/relational/document.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,16 @@ def get_col_spec(self, **_):
204204
def bind_processor(self, dialect):
205205
def process(value):
206206
if value is not None:
207-
return self.get_object_as_json(value, self.cls,
207+
try:
208+
return self.get_object_as_json(value, self.cls,
208209
ignore_wrappers=self.ignore_wrappers,
209210
complex_as=self.complex_as,
210211
).decode(self.encoding)
212+
213+
except Exception as e:
214+
logger.debug("Failed to serialize %r to json: %r", value, e)
215+
raise
216+
211217
return process
212218

213219
def result_processor(self, dialect, col_type):

0 commit comments

Comments
 (0)