| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 | from libs.exception import BaseHTTPExceptionclass NoFileUploadedError(BaseHTTPException):    error_code = 'no_file_uploaded'    description = "Please upload your file."    code = 400class TooManyFilesError(BaseHTTPException):    error_code = 'too_many_files'    description = "Only one file is allowed."    code = 400class FileTooLargeError(BaseHTTPException):    error_code = 'file_too_large'    description = "File size exceeded. {message}"    code = 413class UnsupportedFileTypeError(BaseHTTPException):    error_code = 'unsupported_file_type'    description = "File type not allowed."    code = 415class HighQualityDatasetOnlyError(BaseHTTPException):    error_code = 'high_quality_dataset_only'    description = "Current operation only supports 'high-quality' datasets."    code = 400class DatasetNotInitializedError(BaseHTTPException):    error_code = 'dataset_not_initialized'    description = "The dataset is still being initialized or indexing. Please wait a moment."    code = 400class ArchivedDocumentImmutableError(BaseHTTPException):    error_code = 'archived_document_immutable'    description = "The archived document is not editable."    code = 403class DatasetNameDuplicateError(BaseHTTPException):    error_code = 'dataset_name_duplicate'    description = "The dataset name already exists. Please modify your dataset name."    code = 409class InvalidActionError(BaseHTTPException):    error_code = 'invalid_action'    description = "Invalid action."    code = 400class DocumentAlreadyFinishedError(BaseHTTPException):    error_code = 'document_already_finished'    description = "The document has been processed. Please refresh the page or go to the document details."    code = 400class DocumentIndexingError(BaseHTTPException):    error_code = 'document_indexing'    description = "The document is being processed and cannot be edited."    code = 400class InvalidMetadataError(BaseHTTPException):    error_code = 'invalid_metadata'    description = "The metadata content is incorrect. Please check and verify."    code = 400
 |