diff --git a/synapse/handlers/federation_event.py b/synapse/handlers/federation_event.py index 2248c0fbee..c682a561ab 100644 --- a/synapse/handlers/federation_event.py +++ b/synapse/handlers/federation_event.py @@ -563,7 +563,7 @@ class FederationEventHandler: ): # We should have been given a connected state DAG. If there is a gap in it we # cannot calculate the state, so the response is invalid and we refuse the join. - raise SynapseError(502, "State DAG is not connected") + raise SynapseError(502, "Unable to join because the remote server passed back a state DAG that is not connected (invalid)") # persist the auth chain and state events. # @@ -583,7 +583,7 @@ class FederationEventHandler: ) if room_version.msc4242_state_dags and has_rejected_events: # The state DAG must not include rejected events - raise SynapseError(502, "State DAG included rejected events") + raise SynapseError(502, "Unable to join because the remote server passed back a state DAG that includes rejected events (invalid)") # and now persist the join event itself. logger.info( @@ -2005,7 +2005,7 @@ class FederationEventHandler: event, calculated_auth_events.values() ) except AuthError as e: - logger.warning("Rejecting %r because %s", event, e) + logger.warning("Rejecting %r while persisting state DAG because %s", event, e) context.rejected = RejectedReason.AUTH_ERROR except EventSizeError as e: if e.unpersistable: @@ -2136,7 +2136,7 @@ class FederationEventHandler: """ Checks whether an event should be rejected (for failing auth checks). - For MSC4242 State DAG rooms the auth events are calculated from the state before + For MSC4242 State DAG rooms, the auth events are calculated from the state before the event rather than taken from the event, so checking the event against its auth events (step 4) is the same as checking it against the state before it (step 5), and only step 4 is performed.