diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2020-01-13 12:48:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-13 12:48:22 +0000 |
commit | 326c893d24e0f03b62bd9d1136a335f329bb8528 (patch) | |
tree | 793ea6152daa32a33f5ea953e5c564ffffed4f8c /synapse/handlers/register.py | |
parent | Don't assign numeric IDs for empty usernames (#6690) (diff) | |
download | synapse-326c893d24e0f03b62bd9d1136a335f329bb8528.tar.xz |
Kill off RegistrationError (#6691)
This is pretty pointless. Let's just use SynapseError.
Diffstat (limited to 'synapse/handlers/register.py')
-rw-r--r-- | synapse/handlers/register.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py index 885da82985..7ffc194f0c 100644 --- a/synapse/handlers/register.py +++ b/synapse/handlers/register.py @@ -20,13 +20,7 @@ from twisted.internet import defer from synapse import types from synapse.api.constants import MAX_USERID_LENGTH, LoginType -from synapse.api.errors import ( - AuthError, - Codes, - ConsentNotGivenError, - RegistrationError, - SynapseError, -) +from synapse.api.errors import AuthError, Codes, ConsentNotGivenError, SynapseError from synapse.config.server import is_threepid_reserved from synapse.http.servlet import assert_params_in_dict from synapse.replication.http.login import RegisterDeviceReplicationServlet @@ -165,7 +159,7 @@ class RegistrationHandler(BaseHandler): Returns: Deferred[str]: user_id Raises: - RegistrationError if there was a problem registering. + SynapseError if there was a problem registering. """ yield self.check_registration_ratelimit(address) @@ -182,7 +176,7 @@ class RegistrationHandler(BaseHandler): if not was_guest: try: int(localpart) - raise RegistrationError( + raise SynapseError( 400, "Numeric user IDs are reserved for guest users." ) except ValueError: |