mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-01 04:16:24 -05:00
Converting APIError to use SanicException as base.
This commit is contained in:
parent
58de8c7c5b
commit
9ee73af61d
19 changed files with 181 additions and 161 deletions
|
|
@ -5,11 +5,11 @@ from wrolpi.errors import APIError
|
|||
|
||||
class NoInventories(APIError):
|
||||
code = 'NO_INVENTORIES'
|
||||
summary = 'No Inventories'
|
||||
status = HTTPStatus.BAD_REQUEST
|
||||
message = 'No Inventories'
|
||||
status_code = HTTPStatus.BAD_REQUEST
|
||||
|
||||
|
||||
class InventoriesVersionMismatch(APIError):
|
||||
code = 'INVENTORIES_VERSION_MISMATCH'
|
||||
summary = 'Inventories version in the DB does not match the inventories config'
|
||||
status = HTTPStatus.BAD_REQUEST
|
||||
message = 'Inventories version in the DB does not match the inventories config'
|
||||
status_code = HTTPStatus.BAD_REQUEST
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue