diff --git a/synapse/http/servlet.py b/synapse/http/servlet.py index dead02cd5c4f..80acbdcf3ce7 100644 --- a/synapse/http/servlet.py +++ b/synapse/http/servlet.py @@ -35,7 +35,6 @@ from twisted.web.server import Request from synapse.api.errors import Codes, SynapseError -from synapse.http import redact_uri from synapse.http.server import HttpServer from synapse.types import JsonDict, RoomAlias, RoomID from synapse.util import json_decoder @@ -665,13 +664,7 @@ def parse_json_value_from_request( try: content = json_decoder.decode(content_bytes.decode("utf-8")) except Exception as e: - logger.warning( - "Unable to parse JSON from %s %s response: %s (%s)", - request.method.decode("ascii", errors="replace"), - redact_uri(request.uri.decode("ascii", errors="replace")), - e, - content_bytes, - ) + logger.warning("Unable to parse JSON: %s (%s)", e, content_bytes) raise SynapseError( HTTPStatus.BAD_REQUEST, "Content not JSON.", errcode=Codes.NOT_JSON )