Team Ai
Apppublic

Underground-Digital/Workflow-Engine

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
error.py92 linesDownload Raw Back to datasets
1from libs.exception import BaseHTTPException2 3 4class NoFileUploadedError(BaseHTTPException):5    error_code = "no_file_uploaded"6    description = "Please upload your file."7    code = 4008 9 10class TooManyFilesError(BaseHTTPException):11    error_code = "too_many_files"12    description = "Only one file is allowed."13    code = 40014 15 16class FileTooLargeError(BaseHTTPException):17    error_code = "file_too_large"18    description = "File size exceeded. {message}"19    code = 41320 21 22class UnsupportedFileTypeError(BaseHTTPException):23    error_code = "unsupported_file_type"24    description = "File type not allowed."25    code = 41526 27 28class HighQualityDatasetOnlyError(BaseHTTPException):29    error_code = "high_quality_dataset_only"30    description = "Current operation only supports 'high-quality' datasets."31    code = 40032 33 34class DatasetNotInitializedError(BaseHTTPException):35    error_code = "dataset_not_initialized"36    description = "The dataset is still being initialized or indexing. Please wait a moment."37    code = 40038 39 40class ArchivedDocumentImmutableError(BaseHTTPException):41    error_code = "archived_document_immutable"42    description = "The archived document is not editable."43    code = 40344 45 46class DatasetNameDuplicateError(BaseHTTPException):47    error_code = "dataset_name_duplicate"48    description = "The dataset name already exists. Please modify your dataset name."49    code = 40950 51 52class InvalidActionError(BaseHTTPException):53    error_code = "invalid_action"54    description = "Invalid action."55    code = 40056 57 58class DocumentAlreadyFinishedError(BaseHTTPException):59    error_code = "document_already_finished"60    description = "The document has been processed. Please refresh the page or go to the document details."61    code = 40062 63 64class DocumentIndexingError(BaseHTTPException):65    error_code = "document_indexing"66    description = "The document is being processed and cannot be edited."67    code = 40068 69 70class InvalidMetadataError(BaseHTTPException):71    error_code = "invalid_metadata"72    description = "The metadata content is incorrect. Please check and verify."73    code = 40074 75 76class WebsiteCrawlError(BaseHTTPException):77    error_code = "crawl_failed"78    description = "{message}"79    code = 50080 81 82class DatasetInUseError(BaseHTTPException):83    error_code = "dataset_in_use"84    description = "The dataset is being used by some apps. Please remove the dataset from the apps before deleting it."85    code = 40986 87 88class IndexingEstimateError(BaseHTTPException):89    error_code = "indexing_estimate_error"90    description = "Knowledge indexing estimate failed: {message}"91    code = 50092