summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorreivilibre <oliverw@matrix.org>2021-11-01 15:45:56 +0000
committerGitHub <noreply@github.com>2021-11-01 15:45:56 +0000
commit69ab3dddbc1595ee64c428df7a7f3c861a84b5b0 (patch)
treed765576c98cd2620dfbc87d4c6597c4a34ff5262 /synapse/api
parentRemove deprecated delete room admin API (#11213) (diff)
downloadsynapse-69ab3dddbc1595ee64c428df7a7f3c861a84b5b0.tar.xz
Make `check_event_allowed` module API callback not fail open (accept events) when an exception is raised (#11033)
Diffstat (limited to 'synapse/api')
-rw-r--r--synapse/api/errors.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/api/errors.py b/synapse/api/errors.py
index 685d1c25cf..85302163da 100644
--- a/synapse/api/errors.py
+++ b/synapse/api/errors.py
@@ -596,3 +596,10 @@ class ShadowBanError(Exception):
 
     This should be caught and a proper "fake" success response sent to the user.
     """
+
+
+class ModuleFailedException(Exception):
+    """
+    Raised when a module API callback fails, for example because it raised an
+    exception.
+    """