mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-25 11:05:49 +03:00
Merge pull request #989 from matrix-org/erikj/raise_404
Raise 404 when couldn't find event
This commit is contained in:
commit
e6021c370e
1 changed files with 1 additions and 1 deletions
|
@ -350,7 +350,7 @@ class EventsStore(SQLBaseStore):
|
|||
)
|
||||
|
||||
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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue