zilencer: Give a better error message for foo@example.com emails.

This commit is contained in:
Alex Vandiver 2024-05-23 18:27:33 +00:00 committed by Tim Abbott
parent a1895683b2
commit 9d66a8eb73
2 changed files with 2 additions and 2 deletions

View File

@ -5239,7 +5239,7 @@ class PushBouncerSignupTest(ZulipTestCase):
request["contact_email"] = "admin@example.com"
result = self.client_post("/api/v1/remotes/server/register", request)
self.assert_json_error(result, "Invalid address.")
self.assert_json_error(result, "Invalid email address.")
# An example disposable domain.
request["contact_email"] = "admin@mailnator.com"

View File

@ -167,7 +167,7 @@ def register_remote_server(
contact_email_domain = Address(addr_spec=contact_email).domain.lower()
if contact_email_domain == "example.com":
raise JsonableError(_("Invalid address."))
raise JsonableError(_("Invalid email address."))
# Check if the domain has an MX record
try: