space-test / error_handling.py
Tony Shepherd
added http errors
a5a6006
raw
history blame contribute delete
325 Bytes
from enum import Flag
class ErrorCodes(Flag):
INTERNAL_SERVER_ERROR = (500, "internal server error")
REQUEST_VALIDATION_ERROR = (400, "request validation error")
JWT_VALIDATION_ERROR = (401, "jwt validation error")
TEXT_VALIDATION_ERROR = (490, "text validation error")
OTHER_ERROR = (999, "other error")