Skip to content
Snippets Groups Projects
Unverified Commit 592cdf73 authored by Patrick Cloke's avatar Patrick Cloke Committed by GitHub
Browse files

Improve the error code when trying to register using a name reserved for guests. (#8135)

parent dbc630a6
No related branches found
No related tags found
No related merge requests found
Clarify the error code if a user tries to register with a numeric ID. This bug was introduced in v1.15.0.
...@@ -124,7 +124,9 @@ class RegistrationHandler(BaseHandler): ...@@ -124,7 +124,9 @@ class RegistrationHandler(BaseHandler):
try: try:
int(localpart) int(localpart)
raise SynapseError( raise SynapseError(
400, "Numeric user IDs are reserved for guest users." 400,
"Numeric user IDs are reserved for guest users.",
errcode=Codes.INVALID_USERNAME,
) )
except ValueError: except ValueError:
pass pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment