diff --git a/synapse/rest/client/account.py b/synapse/rest/client/account.py index 583463890859..d39e7fcb5cd5 100644 --- a/synapse/rest/client/account.py +++ b/synapse/rest/client/account.py @@ -356,9 +356,7 @@ async def on_POST(self, request: SynapseRequest) -> Tuple[int, JsonDict]: "Adding emails have been disabled due to lack of an email config" ) raise SynapseError( - HTTPStatus.NOT_FOUND, - "Adding an email to your account is disabled on this server", - Codes.NOT_FOUND, + 400, "Adding an email to your account is disabled on this server", ) body = parse_and_validate_json_object_from_request(