2023-07-17 14:21:27 -06:00
|
|
|
from http import HTTPStatus
|
|
|
|
|
|
|
|
|
|
from wrolpi.errors import APIError
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class UnknownZim(APIError):
|
|
|
|
|
code = 'UNKNOWN_ZIM'
|
2024-05-01 17:42:26 -06:00
|
|
|
message = 'Failed to find the Zim'
|
|
|
|
|
status_code = HTTPStatus.NOT_FOUND
|
2023-07-17 14:21:27 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class UnknownZimEntry(APIError):
|
|
|
|
|
code = 'UNKNOWN_ZIM_ENTRY'
|
2024-05-01 17:42:26 -06:00
|
|
|
message = 'Failed to find the Zim entry at that path'
|
|
|
|
|
status_code = HTTPStatus.NOT_FOUND
|
2023-07-17 14:21:27 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class UnknownZimTagEntry(APIError):
|
|
|
|
|
code = 'UNKNOWN_ZIM_TAG_ENTRY'
|
2024-05-01 17:42:26 -06:00
|
|
|
message = 'Failed to find the TagZimEntry'
|
|
|
|
|
status_code = HTTPStatus.NOT_FOUND
|
2023-07-17 14:21:27 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class UnknownZimSubscription(APIError):
|
|
|
|
|
code = 'UNKNOWN_ZIM_SUBSCRIPTION'
|
2024-05-01 17:42:26 -06:00
|
|
|
message = 'Failed to find the ZimSubscription'
|
|
|
|
|
status_code = HTTPStatus.NOT_FOUND
|