diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2017-12-05 09:40:38 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-05 09:40:38 +0000 |
commit | aa6ecf09846951bd822970ba2b6d7d38abeec0ff (patch) | |
tree | f675cc0f589fb974b529024ca3403be38f03a628 /synapse/api/errors.py | |
parent | Merge pull request #2716 from matrix-org/rav/federation_client_post (diff) | |
parent | Refactor UI auth implementation (diff) | |
download | synapse-aa6ecf09846951bd822970ba2b6d7d38abeec0ff.tar.xz |
Merge pull request #2727 from matrix-org/rav/refactor_ui_auth_return
Refactor UI auth implementation
Diffstat (limited to 'synapse/api/errors.py')
-rw-r--r-- | synapse/api/errors.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/synapse/api/errors.py b/synapse/api/errors.py index d0dfa959dc..79b35b3e7c 100644 --- a/synapse/api/errors.py +++ b/synapse/api/errors.py @@ -140,6 +140,22 @@ class RegistrationError(SynapseError): pass +class InteractiveAuthIncompleteError(Exception): + """An error raised when UI auth is not yet complete + + (This indicates we should return a 401 with 'result' as the body) + + Attributes: + result (dict): the server response to the request, which should be + passed back to the client + """ + def __init__(self, result): + super(InteractiveAuthIncompleteError, self).__init__( + "Interactive auth not yet complete", + ) + self.result = result + + class UnrecognizedRequestError(SynapseError): """An error indicating we don't understand the request you're trying to make""" def __init__(self, *args, **kwargs): |