2023-07-17 14:21:27 -06:00
|
|
|
from http import HTTPStatus
|
|
|
|
|
|
|
|
|
|
from wrolpi.errors import APIError
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class InvalidOTP(APIError):
|
|
|
|
|
code = 'INVALID_OTP'
|
2024-05-01 17:42:26 -06:00
|
|
|
message = 'OTP has invalid characters'
|
|
|
|
|
status_code = HTTPStatus.BAD_REQUEST
|
2023-07-17 14:21:27 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class InvalidPlaintext(APIError):
|
|
|
|
|
code = 'INVALID_PLAINTEXT'
|
2024-05-01 17:42:26 -06:00
|
|
|
message = 'Plaintext has invalid characters'
|
|
|
|
|
status_code = HTTPStatus.BAD_REQUEST
|
2023-07-17 14:21:27 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class InvalidCiphertext(APIError):
|
|
|
|
|
code = 'INVALID_CIPHERTEXT'
|
2024-05-01 17:42:26 -06:00
|
|
|
message = 'Ciphertext has invalid characters'
|
|
|
|
|
status_code = HTTPStatus.BAD_REQUEST
|