Exceptions
dorsal.common.exceptions
APIError
Bases: DorsalClientError
HTTP Error (4xx/5xx).
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
AnnotationConfigurationError
Bases: FileAnnotatorError
Raised when the configuration for an annotation task is invalid.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
AnnotationExecutionError
Bases: FileAnnotatorError
Raised when an annotation model fails during execution or its output is invalid.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
AnnotationImportError
Bases: FileAnnotatorError
Raised when an annotation model or its validator fails to import.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
AnnotationValidationError
Bases: FileAnnotatorError
Raised when a manually provided annotation fails validation against a schema.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
ApiDataValidationError
ApiDataValidationError(
message,
*,
request_url=None,
validation_errors=None,
response_text_snippet=None,
original_exception=None
)
Bases: DorsalClientError
API response parsing/validation error.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
str
|
A concise description of the validation/decoding error. |
required |
request_url
|
str | None
|
The URL that was being accessed. |
None
|
validation_errors
|
list | dict | str | None
|
Specific validation errors (e.g., from Pydantic). |
None
|
response_text_snippet
|
str | None
|
A snippet of the problematic response text. |
None
|
original_exception
|
Exception | None
|
The underlying exception (e.g., JSONDecodeError, pydantic.ValidationError). |
None
|
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
AttributeConflictError
Bases: DorsalError
Raised when an attribute or key cannot be set because it already exists and overwriting is not permitted by the operation.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
AuthError
Bases: DorsalClientError
Error for client-side authentication or API key configuration issues.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
BadRequestError
Bases: DorsalClientError
400 Bad Request error.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
BaseModelProcessingError
Bases: ModelRunnerError
Critical error during the processing of the essential base file model.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
BatchSizeError
Bases: ValidationError
The size of the request is too large.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
ConflictError
Bases: DorsalClientError
409 Conflict error.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
DataQualityError
Bases: DorsalError
Raised when a data quality rule triggers it.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
DatasetExistsError
Bases: ConflictError
Dataset exists.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
DatasetTypeError
Bases: DorsalError
Raised when the type of a dataset prevents some action.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
DependencyCheckError
Bases: ModelRunnerError
Error occurred within a dependency checker function itself.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
DependencyError
Bases: DorsalError
Raised when optional dependencies are missing.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
DependencyNotMetError
Bases: ModelRunnerError
A required dependency for a model was not met. If this was a non-silent dependency, ModelRunner.run() will propagate this error.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
DorsalClientError
Bases: DorsalError
Dorsal Python client error.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
DorsalConfigError
Bases: DorsalError
Config (dorsal.toml) error.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
DorsalError
Bases: Exception
Base class for all custom exceptions raised by the Dorsal library.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
DuplicateFileError
Bases: DorsalError
Duplicate file error.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
DuplicateTagError
Bases: TaggingError
A duplicate tag exists.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
FileAnnotatorError
Bases: DorsalError
Base exception for all errors originating from the FileAnnotator.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
ForbiddenError
Bases: DorsalClientError
403 Forbidden error.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
InvalidTagError
Bases: TaggingError
Tag is invalid.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
MissingHashError
Bases: ModelRunnerError
A required hash (e.g., validation hash) was not found after base model processing.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
ModelExecutionError
Bases: ModelRunnerError
Error during the execution of an individual annotation model's 'main' method.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
ModelImportError
Bases: ModelRunnerError
Errors that occur when trying to import a model or its validator.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
ModelOutputValidationError
Bases: ModelRunnerError
Error when a model's output fails Pydantic validation.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
ModelRunnerConfigError
Bases: ModelRunnerError
Errors related to loading or validating the ModelRunner pipeline configuration.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
ModelRunnerError
Bases: DorsalError
Base class for errors specific to the ModelRunner.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
NetworkError
Bases: DorsalClientError
Network error e.g. timeout or other connectivity issues.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
NotFoundError
Bases: DorsalClientError
404 Not Found error.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
NotPopulatedError
Bases: DorsalError
Indicates data is incomplete.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
PDFProcessingError
Bases: DorsalError
Raised when PDF processing fails (corruption, password protection, etc.).
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
PipelineIntegrityError
Bases: ModelRunnerError
Error indicating an unexpected state or structure in the pipeline results during merging.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
QuickHashConfigurationError
Bases: QuickHasherError, ValueError
Error related to QuickHasher internal configuration.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
QuickHashFileInstabilityError
Bases: QuickHasherError
Error indicating the file changed or was inconsistent during hashing.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
QuickHashFileSizeError
Bases: QuickHasherError, ValueError
Error for file size being outside permitted QuickHasher range when configured to raise.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
QuickHasherError
Bases: DorsalError
Base class for errors specific to QuickHasher operations.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
RateLimitError
Bases: DorsalClientError
429 Too Many Requests error.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
ReadError
Bases: DorsalError
Read error.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
RecordValidationError
Bases: ValidationError
Indicates records failed client-side validation against the dataset's schema.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
SchemaFormatError
Bases: ValidationError
Indicates that a JSON schema document is structurally invalid or unprocessable.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
SyncConflictError
Bases: DorsalError
Raised when a sync operation is blocked because the remote collection has changed since the last synchronization.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
TaggingError
Bases: ValidationError
Error tagging a file.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
TemplateNotFoundError
Bases: DorsalError
Raised when a report template or its essential files cannot be found.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
UnexpectedResponseError
Bases: DorsalClientError
The API returned an unexpected response.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
UnsupportedHashError
Bases: ValidationError
Unsupported file hash.
Source code in venv/lib/python3.13/site-packages/dorsal/common/exceptions.py
ValidationError
Bases: DorsalError
Base validation error class.