error.py 837 B

12345678910111213141516171819202122232425262728293031
  1. from libs.exception import BaseHTTPException
  2. class RepeatPasswordNotMatchError(BaseHTTPException):
  3. error_code = 'repeat_password_not_match'
  4. description = "New password and repeat password does not match."
  5. code = 400
  6. class ProviderRequestFailedError(BaseHTTPException):
  7. error_code = 'provider_request_failed'
  8. description = None
  9. code = 400
  10. class InvalidInvitationCodeError(BaseHTTPException):
  11. error_code = 'invalid_invitation_code'
  12. description = "Invalid invitation code."
  13. code = 400
  14. class AccountAlreadyInitedError(BaseHTTPException):
  15. error_code = 'account_already_inited'
  16. description = "Account already inited."
  17. code = 400
  18. class AccountNotInitializedError(BaseHTTPException):
  19. error_code = 'account_not_initialized'
  20. description = "Account not initialized."
  21. code = 400