summary refs log tree commit diff
path: root/synapse/http/matrixfederationclient.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2021-04-22 16:21:11 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2021-04-22 16:21:11 +0100
commit77f011b8fd0c584fc678ff125912e847a359f77c (patch)
tree1a5c9fa7faacae84d50a7e39f20f486ca1f1fc9c /synapse/http/matrixfederationclient.py
parentMerge commit '3dd6ba135' into anoa/dinsic_release_1_31_0 (diff)
parentAdd basic domain validation for `DomainSpecificString.is_valid`. (#9071) (diff)
downloadsynapse-77f011b8fd0c584fc678ff125912e847a359f77c.tar.xz
Merge commit '98a64b7f7' into anoa/dinsic_release_1_31_0
Diffstat (limited to 'synapse/http/matrixfederationclient.py')
-rw-r--r--synapse/http/matrixfederationclient.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/synapse/http/matrixfederationclient.py b/synapse/http/matrixfederationclient.py

index b261e078c4..b7103d6541 100644 --- a/synapse/http/matrixfederationclient.py +++ b/synapse/http/matrixfederationclient.py
@@ -174,6 +174,16 @@ async def _handle_json_response( d = timeout_deferred(d, timeout=timeout_sec, reactor=reactor) body = await make_deferred_yieldable(d) + except ValueError as e: + # The JSON content was invalid. + logger.warning( + "{%s} [%s] Failed to parse JSON response - %s %s", + request.txn_id, + request.destination, + request.method, + request.uri.decode("ascii"), + ) + raise RequestSendFailed(e, can_retry=False) from e except defer.TimeoutError as e: logger.warning( "{%s} [%s] Timed out reading response - %s %s",