wrolpi/modules/inventory/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

15 lines
391 B
Python

from http import HTTPStatus
from wrolpi.errors import APIError
class UnknownInventory(APIError):
code = 'UNKNOWN_INVENTORY'
summary = 'No inventory with that slug exists'
status_code = HTTPStatus.NOT_FOUND
class InventoryConflict(APIError):
code = 'INVENTORY_CONFLICT'
summary = 'The inventory was modified since it was loaded'
status_code = HTTPStatus.CONFLICT