summary refs log tree commit diff
path: root/synapse/rest/client/room.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/rest/client/room.py')
-rw-r--r--synapse/rest/client/room.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/rest/client/room.py b/synapse/rest/client/room.py

index 2f513164cb..42a2c72b81 100644 --- a/synapse/rest/client/room.py +++ b/synapse/rest/client/room.py
@@ -319,9 +319,10 @@ class JoinRoomAliasServlet(ResolveRoomIdMixin, TransactionRestServlet): try: content = parse_json_object_from_request(request) - except Exception: + except Exception as e: # Turns out we used to ignore the body entirely, and some clients # cheekily send invalid bodies. + logger.warning("Ignoring invalid body on POST %s: %s", request.path, e) content = {} # twisted.web.server.Request.args is incorrectly defined as Optional[Any] @@ -855,9 +856,10 @@ class RoomMembershipRestServlet(TransactionRestServlet): try: content = parse_json_object_from_request(request) - except Exception: + except Exception as e: # Turns out we used to ignore the body entirely, and some clients # cheekily send invalid bodies. + logger.warning("Ignoring invalid body on POST %s: %s", request.path, e) content = {} if membership_action == "invite" and self._has_3pid_invite_keys(content):