error.py 664 B

1234567891011121314151617181920
  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