mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Raise 404 when couldn't find event
This commit is contained in:
parent
32fc39fd4c
commit
a8b946decb
@ -350,7 +350,7 @@ class EventsStore(SQLBaseStore):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if not events and not allow_none:
|
if not events and not allow_none:
|
||||||
raise RuntimeError("Could not find event %s" % (event_id,))
|
raise SynapseError(404, "Could not find event %s" % (event_id,))
|
||||||
|
|
||||||
defer.returnValue(events[0] if events else None)
|
defer.returnValue(events[0] if events else None)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user