error.py 558 B

1234567891011121314151617181920
  1. # -*- coding:utf-8 -*-
  2. from libs.exception import BaseHTTPException
  3. class ArchivedDocumentImmutableError(BaseHTTPException):
  4. error_code = 'archived_document_immutable'
  5. description = "Cannot operate when document was archived."
  6. code = 403
  7. class DocumentIndexingError(BaseHTTPException):
  8. error_code = 'document_indexing'
  9. description = "Cannot operate document during indexing."
  10. code = 403
  11. class DatasetNotInitedError(BaseHTTPException):
  12. error_code = 'dataset_not_inited'
  13. description = "Dataset not inited."
  14. code = 403