Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
push_notifications: Provide a hint when the server is not registered.
Alex Vandivercbbd4b128d62
diff --git a/zerver/decorator.py b/zerver/decorator.pyindex c84b7af5c25..e2a49b8f6b5 100644--- a/zerver/decorator.py+++ b/zerver/decorator.py@@ -211,7 +211,7 @@ class InvalidZulipServerError(JsonableError):@staticmethoddef msg_format() -> str:- return "Zulip server auth failure: {role} is not registered"+ return "Zulip server auth failure: {role} is not registered -- did you run `manage.py register_server`?"class InvalidZulipServerKeyError(InvalidZulipServerError):diff --git a/zerver/tests/test_push_notifications.py b/zerver/tests/test_push_notifications.pyindex f20c6d53e05..ba818745b3c 100644--- a/zerver/tests/test_push_notifications.py+++ b/zerver/tests/test_push_notifications.py@@ -247,7 +247,9 @@ class PushBouncerNotificationTest(BouncerTestCase):HTTP_AUTHORIZATION=api_auth,)self.assert_json_error(- result, "Zulip server auth failure: 5678-efgh is not registered", status_code=401+ result,+ "Zulip server auth failure: 5678-efgh is not registered -- did you run `manage.py register_server`?",+ status_code=401,)def test_remote_push_user_endpoints(self) -> None:@@ -1981,7 +1983,7 @@ class TestSendToPushBouncer(ZulipTestCase):self.assertEqual(str(exc.exception),"Push notifications bouncer error: "- "Zulip server auth failure: testRole is not registered",+ "Zulip server auth failure: testRole is not registered -- did you run `manage.py register_server`?",)@responses.activate