summary refs log tree commit diff
path: root/synapse/api/errors.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-06-10 16:05:10 +0100
committerErik Johnston <erik@matrix.org>2019-06-10 16:05:10 +0100
commitaad993f24d3a33bd2b3172f6d47c2d28d3e7a921 (patch)
tree7f74b4f6795b91d81ceed8ea0f5a3b1e0f2a5876 /synapse/api/errors.py
parentMerge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes (diff)
parentMerge branch 'erikj/fix_null_valid_until_ms' of github.com:matrix-org/synapse... (diff)
downloadsynapse-aad993f24d3a33bd2b3172f6d47c2d28d3e7a921.tar.xz
Merge branch 'release-v1.0.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
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.