hubvault.errors
Public exception types for the hubvault package.
This module defines the stable error model exposed by the MVP repository API. Callers are expected to catch these exceptions instead of depending on implementation details from the storage backend.
The module contains:
HubVaultError- Base exception for all package-specific errorsRepositoryNotFoundError- Raised when a target repository does not existRepositoryAlreadyExistsError- Raised when creating an already existing repositoryRevisionNotFoundError- Raised when a branch, tag, or commit cannot be resolvedEntryNotFoundError- Raised when a requested repo path does not existConflictError- Raised when optimistic concurrency checks failIntegrityError- Raised when stored data does not match expected integrity checksVerificationError- Raised when repository verification failsHubVaultValidationError- Raised when public inputs fail validationUnsupportedPathError- Raised when a repo path or ref name is invalid
Example:
>>> from hubvault.errors import RepositoryNotFoundError
>>> err = RepositoryNotFoundError("missing")
>>> str(err)
'missing'
HubVaultError
RepositoryNotFoundError
RepositoryAlreadyExistsError
RevisionNotFoundError
EntryNotFoundError
ConflictError
IntegrityError
VerificationError
HubVaultValidationError
- class hubvault.errors.HubVaultValidationError[source]
Raised when a public input fails local repository validation.
This class is the local-name counterpart to the
huggingface_hubvalidation error family while remaining anchored inhubvault.Example:
>>> isinstance(HubVaultValidationError("bad input"), ValueError) True