您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. from libs.exception import BaseHTTPException
  2. class DatasetNotInitializedError(BaseHTTPException):
  3. error_code = "dataset_not_initialized"
  4. description = "The dataset is still being initialized or indexing. Please wait a moment."
  5. code = 400
  6. class ArchivedDocumentImmutableError(BaseHTTPException):
  7. error_code = "archived_document_immutable"
  8. description = "The archived document is not editable."
  9. code = 403
  10. class DatasetNameDuplicateError(BaseHTTPException):
  11. error_code = "dataset_name_duplicate"
  12. description = "The dataset name already exists. Please modify your dataset name."
  13. code = 409
  14. class InvalidActionError(BaseHTTPException):
  15. error_code = "invalid_action"
  16. description = "Invalid action."
  17. code = 400
  18. class DocumentAlreadyFinishedError(BaseHTTPException):
  19. error_code = "document_already_finished"
  20. description = "The document has been processed. Please refresh the page or go to the document details."
  21. code = 400
  22. class DocumentIndexingError(BaseHTTPException):
  23. error_code = "document_indexing"
  24. description = "The document is being processed and cannot be edited."
  25. code = 400
  26. class InvalidMetadataError(BaseHTTPException):
  27. error_code = "invalid_metadata"
  28. description = "The metadata content is incorrect. Please check and verify."
  29. code = 400
  30. class DatasetInUseError(BaseHTTPException):
  31. error_code = "dataset_in_use"
  32. description = "The dataset is being used by some apps. Please remove the dataset from the apps before deleting it."
  33. code = 409