feat: проверка существования канала при привязке
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user