mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-02 20:59:56 -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,17 +5,17 @@ from wrolpi.errors import APIError
|
|||
|
||||
class InvalidOTP(APIError):
|
||||
code = 'INVALID_OTP'
|
||||
summary = 'OTP has invalid characters'
|
||||
status = HTTPStatus.BAD_REQUEST
|
||||
message = 'OTP has invalid characters'
|
||||
status_code = HTTPStatus.BAD_REQUEST
|
||||
|
||||
|
||||
class InvalidPlaintext(APIError):
|
||||
code = 'INVALID_PLAINTEXT'
|
||||
summary = 'Plaintext has invalid characters'
|
||||
status = HTTPStatus.BAD_REQUEST
|
||||
message = 'Plaintext has invalid characters'
|
||||
status_code = HTTPStatus.BAD_REQUEST
|
||||
|
||||
|
||||
class InvalidCiphertext(APIError):
|
||||
code = 'INVALID_CIPHERTEXT'
|
||||
summary = 'Ciphertext has invalid characters'
|
||||
status = HTTPStatus.BAD_REQUEST
|
||||
message = 'Ciphertext has invalid characters'
|
||||
status_code = HTTPStatus.BAD_REQUEST
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue