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

Commit

Permalink
Fix typo in RelationAggregationPaginationServlet error response (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
anoadragon453 authored Nov 9, 2021
1 parent af78464 commit 4b3e30c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/11278.misc
Original file line number Diff line number Diff line change
@@ -0,0 +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}`.
4 changes: 3 additions & 1 deletion synapse/rest/client/relations.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,9 @@ async def on_GET(
raise SynapseError(404, "Unknown parent event.")

if relation_type not in (RelationTypes.ANNOTATION, None):
raise SynapseError(400, "Relation type must be 'annotation'")
raise SynapseError(
400, f"Relation type must be '{RelationTypes.ANNOTATION}'"
)

limit = parse_integer(request, "limit", default=5)
from_token_str = parse_string(request, "from")
Expand Down

0 comments on commit 4b3e30c

Please sign in to comment.