error.py 856 B

1234567891011121314151617181920212223242526
  1. from libs.exception import BaseHTTPException
  2. class AlreadySetupError(BaseHTTPException):
  3. error_code = 'already_setup'
  4. description = "Dify has been successfully installed. Please refresh the page or return to the dashboard homepage."
  5. code = 403
  6. class NotSetupError(BaseHTTPException):
  7. error_code = 'not_setup'
  8. description = "Dify has not been initialized and installed yet. " \
  9. "Please proceed with the initialization and installation process first."
  10. code = 401
  11. class AccountNotLinkTenantError(BaseHTTPException):
  12. error_code = 'account_not_link_tenant'
  13. description = "Account not link tenant."
  14. code = 403
  15. class AlreadyActivateError(BaseHTTPException):
  16. error_code = 'already_activate'
  17. description = "Auth Token is invalid or account already activated, please check again."
  18. code = 403