1
0

Compare commits

...

1 Commits

Author SHA1 Message Date
Andrew Morgan 20fc57683c log exceptions in _async_write_json_to_request_in_thread 2022-01-20 17:42:01 +00:00
+5 -1
View File
@@ -776,7 +776,11 @@ async def _async_write_json_to_request_in_thread(
with start_active_span("encode_json_response"):
span = active_span()
json_str = await defer_to_thread(request.reactor, encode, span)
try:
json_str = await defer_to_thread(request.reactor, encode, span)
except Exception:
logger.exception("failed to encode json response")
return
_write_bytes_to_request(request, json_str)