error.py 943 B

1234567891011121314151617181920212223242526272829303132
  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 = "The account has been initialized. Please refresh the page."
  17. code = 400
  18. class AccountNotInitializedError(BaseHTTPException):
  19. error_code = 'account_not_initialized'
  20. description = "The account has not been initialized yet. Please proceed with the initialization process first."
  21. code = 400