diff options
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/profile.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/handlers/profile.py b/synapse/handlers/profile.py index 14348faaf3..74a1ddd780 100644 --- a/synapse/handlers/profile.py +++ b/synapse/handlers/profile.py @@ -189,7 +189,9 @@ class ProfileHandler(BaseHandler): ) if not isinstance(new_displayname, str): - raise SynapseError(400, "Invalid displayname") + raise SynapseError( + 400, "'displayname' must be a string", errcode=Codes.INVALID_PARAM + ) if len(new_displayname) > MAX_DISPLAYNAME_LEN: raise SynapseError( @@ -273,7 +275,9 @@ class ProfileHandler(BaseHandler): ) if not isinstance(new_avatar_url, str): - raise SynapseError(400, "Invalid displayname") + raise SynapseError( + 400, "'avatar_url' must be a string", errcode=Codes.INVALID_PARAM + ) if len(new_avatar_url) > MAX_AVATAR_URL_LEN: raise SynapseError( |