errors: Standardize "already in use" error messages.

Updates these error messages to have "X is already in use." format,
e.g., "Channel name is already in use." and "Name is already in use."

Fixes #33629.
This commit is contained in:
ImDooMLorD
2025-02-28 01:22:37 +05:30
committed by Tim Abbott
parent b6f09b6dab
commit 6dea58623c
9 changed files with 16 additions and 14 deletions

View File

@@ -108,7 +108,7 @@ def check_bot_name_available(realm_id: int, full_name: str, *, is_activation: bo
f'There is already an active bot named "{full_name}" in this organization. To reactivate this bot, you must rename or deactivate the other one first.'
)
else:
raise JsonableError(_("Name is already in use!"))
raise JsonableError(_("Name is already in use."))
def check_short_name(short_name_raw: str) -> str: