Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
bots: Fix email already in use error message.
PieterCK71e412ec0093
diff --git a/zerver/tests/test_bots.py b/zerver/tests/test_bots.pyindex 0bb8337d6bc..73b2da91223 100644--- a/zerver/tests/test_bots.py+++ b/zerver/tests/test_bots.py@@ -251,7 +251,7 @@ class BotTest(ZulipTestCase, UploadSerializeMixin):short_name="hambot",)result = self.client_post("/json/bots", bot_info)- self.assert_json_error(result, "Username already in use")+ self.assert_json_error(result, "Email '[email protected]' already in use")dup_full_name = "The Bot of Hamlet"diff --git a/zerver/views/users.py b/zerver/views/users.pyindex c9c7d8e9373..75273f9ac39 100644--- a/zerver/views/users.py+++ b/zerver/views/users.py@@ -603,7 +603,7 @@ def add_bot_backend(raise JsonableError(_("Bad name or username"))try:get_user_by_delivery_email(email, user_profile.realm)- raise JsonableError(_("Username already in use"))+ raise JsonableError(_("Email '{email}' already in use").format(email=email))except UserProfile.DoesNotExist:pass