summary refs log tree commit diff
path: root/synapse/storage/events.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-08-05 15:31:02 +0100
committerErik Johnston <erik@matrix.org>2016-08-05 15:31:02 +0100
commita8b946decbc8d43fe51313235460076da400f720 (patch)
tree379243f4274afd375a77a5fdefa4d5410adf34be /synapse/storage/events.py
parentMerge pull request #987 from matrix-org/erikj/fix_backfill_auth (diff)
downloadsynapse-a8b946decbc8d43fe51313235460076da400f720.tar.xz
Raise 404 when couldn't find event
Diffstat (limited to '')
-rw-r--r--synapse/storage/events.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py
index e4dbaa3547..d2feee8dbb 100644
--- a/synapse/storage/events.py
+++ b/synapse/storage/events.py
@@ -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)