summary refs log tree commit diff
path: root/synapse/api/errors.py
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2019-06-12 14:36:44 +0100
committerBrendan Abolivier <babolivier@matrix.org>2019-06-12 14:36:44 +0100
commitd907e8f599554a3ff1b65bf7eb22aeb1e63e5f21 (patch)
tree10a2ab2f26bd387c2e62ac265d21762acf26790f /synapse/api/errors.py
parentMerge branch 'master' into dinsic (diff)
parent1.0.0 (diff)
downloadsynapse-d907e8f599554a3ff1b65bf7eb22aeb1e63e5f21.tar.xz
Merge branch 'master' into dinsic
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 7e0f025a49..e46bfdfcb9 100644 --- a/synapse/api/errors.py +++ b/synapse/api/errors.py
@@ -347,6 +347,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.