summary refs log tree commit diff
path: root/synapse/api/errors.py
diff options
context:
space:
mode:
authorAmber H. Brown <hawkowl@atleastfornow.net>2019-06-18 21:20:13 +1000
committerAmber H. Brown <hawkowl@atleastfornow.net>2019-06-18 21:20:13 +1000
commite60aab14b4203b91bad23417b1664289b4b558b6 (patch)
tree1ea1d01dd14ad85d5eeda1c460282f7c615dd55c /synapse/api/errors.py
parentMerge remote-tracking branch 'origin/master' into shhs (diff)
parentFix seven contrib files with Python syntax errors (#5446) (diff)
downloadsynapse-e60aab14b4203b91bad23417b1664289b4b558b6.tar.xz
Merge remote-tracking branch 'origin/develop' into shhs
Diffstat (limited to 'synapse/api/errors.py')
-rw-r--r--synapse/api/errors.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/api/errors.py b/synapse/api/errors.py

index e91697049c..66201d6efe 100644 --- a/synapse/api/errors.py +++ b/synapse/api/errors.py
@@ -339,6 +339,15 @@ class UnsupportedRoomVersionError(SynapseError): ) +class ThreepidValidationError(SynapseError): + """An error raised when there was a problem authorising an event.""" + + def __init__(self, *args, **kwargs): + if "errcode" not in kwargs: + kwargs["errcode"] = Codes.FORBIDDEN + super(ThreepidValidationError, self).__init__(*args, **kwargs) + + class IncompatibleRoomVersionError(SynapseError): """A server is trying to join a room whose version it does not support.