summary refs log tree commit diff
path: root/synapse/api/errors.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-12-22 17:23:35 +0000
committerDavid Baker <dave@matrix.org>2015-12-22 17:23:35 +0000
commit140a50f641ce345053fc9bdf6bfadffb063f1424 (patch)
tree5fc29aed1a423bde9e6e317072b72233767240a5 /synapse/api/errors.py
parentAdd some comments to areas that could be optimised. (diff)
parentMerge pull request #455 from matrix-org/markjh/guest_access (diff)
downloadsynapse-140a50f641ce345053fc9bdf6bfadffb063f1424.tar.xz
Merge remote-tracking branch 'origin/develop' into store_event_actions
Diffstat (limited to 'synapse/api/errors.py')
-rw-r--r--synapse/api/errors.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/synapse/api/errors.py b/synapse/api/errors.py

index d4037b3d55..8bc7b9e6db 100644 --- a/synapse/api/errors.py +++ b/synapse/api/errors.py
@@ -120,6 +120,22 @@ class AuthError(SynapseError): super(AuthError, self).__init__(*args, **kwargs) +class GuestAccessError(AuthError): + """An error raised when a there is a problem with a guest user accessing + a room""" + + def __init__(self, rooms, *args, **kwargs): + self.rooms = rooms + super(GuestAccessError, self).__init__(*args, **kwargs) + + def error_dict(self): + return cs_error( + self.msg, + self.errcode, + rooms=self.rooms, + ) + + class EventSizeError(SynapseError): """An error raised when an event is too big."""