+10









-LAN-
GitHub
twwu
crazywoola
jyong
Wu Tianwei
QuantumGhost
lyzno1
quicksand
Jyong
lyzno1
zxhlyh
Yongtao Huang
autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Joel
Copilot
nite-knite
Hanqing Zhao
gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Harry
85cda47c70
Signed-off-by: -LAN- <[email protected]> Co-authored-by: twwu <[email protected]> Co-authored-by: crazywoola <[email protected]> Co-authored-by: jyong <[email protected]> Co-authored-by: Wu Tianwei <[email protected]> Co-authored-by: QuantumGhost <[email protected]> Co-authored-by: lyzno1 <[email protected]> Co-authored-by: quicksand <[email protected]> Co-authored-by: Jyong <[email protected]> Co-authored-by: lyzno1 <[email protected]> Co-authored-by: zxhlyh <[email protected]> Co-authored-by: Yongtao Huang <[email protected]> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Joel <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: nite-knite <[email protected]> Co-authored-by: Hanqing Zhao <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Harry <[email protected]>
56 lines
1.7 KiB
Python
56 lines
1.7 KiB
Python
from libs.exception import BaseHTTPException
|
|
|
|
|
|
class DatasetNotInitializedError(BaseHTTPException):
|
|
error_code = "dataset_not_initialized"
|
|
description = "The dataset is still being initialized or indexing. Please wait a moment."
|
|
code = 400
|
|
|
|
|
|
class ArchivedDocumentImmutableError(BaseHTTPException):
|
|
error_code = "archived_document_immutable"
|
|
description = "The archived document is not editable."
|
|
code = 403
|
|
|
|
|
|
class DatasetNameDuplicateError(BaseHTTPException):
|
|
error_code = "dataset_name_duplicate"
|
|
description = "The dataset name already exists. Please modify your dataset name."
|
|
code = 409
|
|
|
|
|
|
class InvalidActionError(BaseHTTPException):
|
|
error_code = "invalid_action"
|
|
description = "Invalid action."
|
|
code = 400
|
|
|
|
|
|
class DocumentAlreadyFinishedError(BaseHTTPException):
|
|
error_code = "document_already_finished"
|
|
description = "The document has been processed. Please refresh the page or go to the document details."
|
|
code = 400
|
|
|
|
|
|
class DocumentIndexingError(BaseHTTPException):
|
|
error_code = "document_indexing"
|
|
description = "The document is being processed and cannot be edited."
|
|
code = 400
|
|
|
|
|
|
class InvalidMetadataError(BaseHTTPException):
|
|
error_code = "invalid_metadata"
|
|
description = "The metadata content is incorrect. Please check and verify."
|
|
code = 400
|
|
|
|
|
|
class DatasetInUseError(BaseHTTPException):
|
|
error_code = "dataset_in_use"
|
|
description = "The dataset is being used by some apps. Please remove the dataset from the apps before deleting it."
|
|
code = 409
|
|
|
|
|
|
class PipelineRunError(BaseHTTPException):
|
|
error_code = "pipeline_run_error"
|
|
description = "An error occurred while running the pipeline."
|
|
code = 500
|