wrolpi/modules/videos/errors.py
lrnselfreliance 22ada7eb57
Remove unused code found by vulture (#885)
Deletes functions, methods, classes, schema dataclasses, error classes, Events
senders, and module-level constants that nothing references, including tests.
Also drops the unused `doc_cleanup(test_directory)` and
`_wait_for_sub_job_with_progress(collection_idx)` parameters, and the imports
that only served removed code.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 15:50:09 -06:00

39 lines
1 KiB
Python

from http import HTTPStatus
from wrolpi.errors import APIError
class UnknownVideo(APIError):
code = 'UNKNOWN_VIDEO'
summary = 'The video could not be found.'
status_code = HTTPStatus.NOT_FOUND
class UnknownChannel(APIError):
code = 'UNKNOWN_CHANNEL'
summary = 'The channel could not be found.'
status_code = HTTPStatus.NOT_FOUND
class ChannelNameConflict(APIError):
code = 'CHANNEL_NAME_CONFLICT'
summary = 'The channel name is already taken.'
status_code = HTTPStatus.BAD_REQUEST
class ChannelURLConflict(APIError):
code = 'CHANNEL_URL_CONFLICT'
summary = 'The URL is already used by another channel.'
status_code = HTTPStatus.BAD_REQUEST
class ChannelDirectoryConflict(APIError):
code = 'CHANNEL_DIRECTORY_CONFLICT'
summary = 'The directory is already used by another channel.'
status_code = HTTPStatus.BAD_REQUEST
class ChannelSourceIdConflict(APIError):
code = 'CHANNEL_SOURCE_ID_CONFLICT'
summary = 'Search is empty, search_str must have content.'
status_code = HTTPStatus.BAD_REQUEST