From d4d3629aaf930d2febfc98f8ef1ef6bd315b8a4e Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 8 Mar 2017 17:01:26 +0000 Subject: [PATCH] Better error message --- synapse/rest/client/v2_alpha/register.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/synapse/rest/client/v2_alpha/register.py b/synapse/rest/client/v2_alpha/register.py index 98b277e07..2c184b731 100644 --- a/synapse/rest/client/v2_alpha/register.py +++ b/synapse/rest/client/v2_alpha/register.py @@ -107,7 +107,9 @@ class MsisdnRegisterRequestTokenRestServlet(RestServlet): ) if existingUid is not None: - raise SynapseError(400, "MSISDN is already in use", Codes.THREEPID_IN_USE) + raise SynapseError( + 400, "Phone number is already in use", Codes.THREEPID_IN_USE + ) ret = yield self.identity_handler.requestMsisdnToken(**body) defer.returnValue((200, ret))