Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 4b3e30c

Browse files
Fix typo in RelationAggregationPaginationServlet error response (#11278)
1 parent af78464 commit 4b3e30c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

changelog.d/11278.misc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a small typo in the error response when a relation type other than 'm.annotation' is passed to `GET /rooms/{room_id}/aggregations/{event_id}`.

synapse/rest/client/relations.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,9 @@ async def on_GET(
298298
raise SynapseError(404, "Unknown parent event.")
299299

300300
if relation_type not in (RelationTypes.ANNOTATION, None):
301-
raise SynapseError(400, "Relation type must be 'annotation'")
301+
raise SynapseError(
302+
400, f"Relation type must be '{RelationTypes.ANNOTATION}'"
303+
)
302304

303305
limit = parse_integer(request, "limit", default=5)
304306
from_token_str = parse_string(request, "from")

0 commit comments

Comments
 (0)