| 123456789101112131415161718192021222324252627282930313233343536 |
- """
- common_error -
- auther: tanlie
- date: 2026/8/23
- """
- from app.exceptions.api_exception import APIException
- class ServerError(APIException):
- code = 500
- msg = 'sorry, we made a mistake (* ̄︶ ̄)!'
- error_code = 999
- class ParameterException(APIException):
- code = 400
- msg = 'invalid parameter'
- error_code = 1000
- class NotFound(APIException):
- code = 404
- msg = 'the resource are not found O__O...'
- error_code = 1001
- class AuthFailed(APIException):
- code = 401
- error_code = 1005
- msg = 'authorization failed'
- class Forbidden(APIException):
- code = 403
- error_code = 1004
- msg = 'forbidden, not in scope'
|