summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2016-08-05 15:54:16 +0100
committerGitHub <noreply@github.com>2016-08-05 15:54:16 +0100
commite6021c370ee87215a3c8dc31046dd6dc304931f2 (patch)
tree09e7e42c474e90145ed34ad7d43b8ff0ae1fb1bf
parentMerge pull request #988 from matrix-org/erikj/ignore_comments_preview (diff)
parentRaise 404 when couldn't find event (diff)
downloadsynapse-e6021c370ee87215a3c8dc31046dd6dc304931f2.tar.xz
Merge pull request #989 from matrix-org/erikj/raise_404
Raise 404 when couldn't find event
-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)