mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
zilencer: Improve "hostname already exists" error in registration.
Users most likely to run into this will be the ones who are moving to a new server, but keeping their original domain and thus just need to transfer the registration.
This commit is contained in:
committed by
Tim Abbott
parent
4e22a79e6a
commit
685e49d34d
@@ -5359,7 +5359,13 @@ class PushBouncerSignupTest(ZulipTestCase):
|
||||
contact_email="server-admin@zulip.com",
|
||||
)
|
||||
result = self.client_post("/api/v1/remotes/server/register", request)
|
||||
self.assert_json_error(result, "A server with hostname example.com already exists")
|
||||
self.assert_json_error(
|
||||
result,
|
||||
"A server with hostname example.com already exists. "
|
||||
"If you control the hostname "
|
||||
"and want to transfer the registration to this server, you can run manage.py register_server "
|
||||
"with the --registration-takeover flag.",
|
||||
)
|
||||
|
||||
def test_register_contact_email_validation_rules(self) -> None:
|
||||
zulip_org_id = str(uuid.uuid4())
|
||||
|
@@ -260,7 +260,11 @@ def register_remote_server(
|
||||
|
||||
if remote_server is None and RemoteZulipServer.objects.filter(hostname=hostname).exists():
|
||||
raise JsonableError(
|
||||
_("A server with hostname {hostname} already exists").format(hostname=hostname)
|
||||
_(
|
||||
"A server with hostname {hostname} already exists. If you control the hostname "
|
||||
"and want to transfer the registration to this server, you can run manage.py register_server "
|
||||
"with the --registration-takeover flag."
|
||||
).format(hostname=hostname)
|
||||
)
|
||||
|
||||
with transaction.atomic(durable=True):
|
||||
|
Reference in New Issue
Block a user