1 files changed, 8 insertions, 0 deletions
diff --git a/synapse/rest/client/room_batch.py b/synapse/rest/client/room_batch.py
index e4c9451ae0..c9509d2ae3 100644
--- a/synapse/rest/client/room_batch.py
+++ b/synapse/rest/client/room_batch.py
@@ -131,6 +131,14 @@ class RoomBatchSendEventRestServlet(RestServlet):
prev_event_ids_from_query
)
+ if not auth_event_ids:
+ raise SynapseError(
+ HTTPStatus.BAD_REQUEST,
+ "No auth events found for given prev_event query parameter. The prev_event=%s probably does not exist."
+ % prev_event_ids_from_query,
+ errcode=Codes.INVALID_PARAM,
+ )
+
state_event_ids_at_start = []
# Create and persist all of the state events that float off on their own
# before the batch. These will most likely be all of the invite/member
|