summary refs log tree commit diff
path: root/synapse/api/errors.py
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2019-05-21 10:21:27 +0100
committerBrendan Abolivier <babolivier@matrix.org>2019-05-21 10:21:27 +0100
commit42cea6b4373c41fa44db1cc6c202ef97e32f4a18 (patch)
tree17d2000d40645d7fac1e56009a3229edfac65e00 /synapse/api/errors.py
parentAlso test the /password client route (diff)
downloadsynapse-42cea6b4373c41fa44db1cc6c202ef97e32f4a18.tar.xz
Make error messages more explicit
Diffstat (limited to 'synapse/api/errors.py')
-rw-r--r--synapse/api/errors.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/api/errors.py b/synapse/api/errors.py

index 22e0fcfa83..e6c67acf96 100644 --- a/synapse/api/errors.py +++ b/synapse/api/errors.py
@@ -361,10 +361,14 @@ class PasswordRefusedError(SynapseError): """A password has been refused, either during password reset/change or registration. """ - def __init__(self, errcode=Codes.WEAK_PASSWORD): + def __init__( + self, + msg="This password doesn't comply with the server's policy", + errcode=Codes.WEAK_PASSWORD, + ): super(PasswordRefusedError, self).__init__( code=400, - msg="This password doesn't comply with the server's policy", + msg=msg, errcode=errcode, )