summary refs log tree commit diff
path: root/synapse/handlers/register.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-01-14 17:21:04 +0000
committerDavid Baker <dave@matrix.org>2016-01-14 17:21:04 +0000
commit3f8db3d597dc631af02c31995426a3690746c8b5 (patch)
treefb23cbf9573ae74b7cf7b4846369efa45e385297 /synapse/handlers/register.py
parentMerge pull request #497 from matrix-org/erikj/max_limit (diff)
downloadsynapse-3f8db3d597dc631af02c31995426a3690746c8b5.tar.xz
Add specific error code for invalid user names.
Diffstat (limited to 'synapse/handlers/register.py')
-rw-r--r--synapse/handlers/register.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py
index ba26d13d49..83f4daaa8c 100644
--- a/synapse/handlers/register.py
+++ b/synapse/handlers/register.py
@@ -53,7 +53,8 @@ class RegistrationHandler(BaseHandler):
             raise SynapseError(
                 400,
                 "User ID must only contain characters which do not"
-                " require URL encoding."
+                " require URL encoding.",
+                Codes.INVALID_USER_NAME
             )
 
         user = UserID(localpart, self.hs.hostname)