feat: проверка существования канала при привязке

This commit is contained in:
Artem Tsyrulnikov
2025-12-15 22:09:23 +03:00
parent 68edf11576
commit 83a81f46f7
22 changed files with 270 additions and 125 deletions

View File

@@ -31,6 +31,12 @@ def ChannelNotFound(channel_id: uuid.UUID | None = None) -> HTTPException:
return HTTPException(status.HTTP_404_NOT_FOUND, f'Channel {channel_id} not found')
def TelegramChannelNotFound(username: str) -> HTTPException:
return HTTPException(
status.HTTP_404_NOT_FOUND, f'Telegram channel @{username} not found or is not a public channel'
)
def ProjectNotFound(project_id: uuid.UUID | None = None) -> HTTPException:
if project_id is None:
return HTTPException(status.HTTP_404_NOT_FOUND, 'Project not found')