From dc1f1886217fc0f9ab5990a62a1a65ba507a2fd5 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Wed, 20 Jul 2022 13:43:07 +0100 Subject: [PATCH] Revert "Better errcode when pw reset emails are disabled" This reverts commit 9a47994019855b75ff381584ab75c9f137902a01. --- synapse/rest/client/account.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/synapse/rest/client/account.py b/synapse/rest/client/account.py index b4cd5d9d313c..950e4c3fc12b 100644 --- a/synapse/rest/client/account.py +++ b/synapse/rest/client/account.py @@ -15,7 +15,6 @@ # limitations under the License. import logging import random -from http import HTTPStatus from typing import TYPE_CHECKING, Optional, Tuple from urllib.parse import urlparse @@ -83,9 +82,7 @@ async def on_POST(self, request: SynapseRequest) -> Tuple[int, JsonDict]: "User password resets have been disabled due to lack of email config" ) raise SynapseError( - HTTPStatus.NOT_FOUND, - "Email-based password resets have been disabled on this server", - Codes.NOT_FOUND, + 400, "Email-based password resets have been disabled on this server" ) body = parse_and_validate_json_object_from_request(