yera.creds.exceptions

Credential exception hierarchy.

Symbols

class CredentialError — Base for all credential-related errors.
class CredentialGroupAlreadyExistsError — Target credential group name already exists during rename.
class CredentialGroupNameError — A credential group name failed structural validation.
class CredentialGroupNotAuthorisedError — This project root is not in ``authorised_roots`` for the requested credential group.
class CredentialGroupNotFoundError — A named credential group has no entry in ``credential_groups``.
class CredentialGroupNotSpecifiedError — No active credential group is configured for this project.
class CredentialInvalidError — A single credential entry failed schema validation.
class CredentialKeyError — A credential key failed structural validation.
class CredentialStoreCorruptError — The credentials file cannot be parsed (invalid JSON or wrong top-level type).
class CredentialVersionError — The credentials file has an unsupported version number.
class SecretAccessDeniedError — The caller is not authorized to access the requested secret.
class SecretConflictError — A conditional secret mutation conflicts with current stored state.
class SecretNotFoundError — A requested secret does not exist.
class SecretStoreBusyError — The secret store could not be locked within the allowed time.
class SecretStoreCorruptError — The secret store cannot be parsed or validated.
class SecretStoreError — Base for failures raised through the secret-store interface.
class SecretStoreUnavailableError — The configured secret store cannot be reached or opened.
class SecretStoreUnsafeError — The secret store fails its required security checks.

CredentialGroupAlreadyExistsError

Inherits: CredentialError

Target credential group name already exists during rename.

Methods

__init__ — Build an error describing the credential group name conflict.

CredentialGroupAlreadyExistsError.__init__

__init__(
    group_name: str,
    credential_count: int,
    authorised_roots: list[str],
) → None

Build an error describing the credential group name conflict.

Parameters

group_name
type: str

Existing credential group that blocks the operation.

credential_count
type: int

Number of credentials held by the existing group.

authorised_roots
type: list[str]

Project roots allowed to use the existing group.

CredentialGroupNameError

Inherits: CredentialError

A credential group name failed structural validation.

CredentialGroupNotAuthorisedError

Inherits: CredentialError

This project root is not in authorised_roots for the requested credential group.

Methods

__init__ — Build an error describing why a project cannot use a credential group.

CredentialGroupNotAuthorisedError.__init__

__init__(
    group_name: str,
    authorised_roots: list[str],
    current_root: Path | None,
) → None

Build an error describing why a project cannot use a credential group.

Parameters

group_name
type: str

Credential group denied to the current project.

authorised_roots
type: list[str]

Project roots allowed to use the group.

current_root
type: Path | None

Current project root, or None when unresolved.

CredentialGroupNotFoundError

Inherits: CredentialError

A named credential group has no entry in credential_groups.

Methods

__init__ — Build an error identifying the missing credential group.

CredentialGroupNotFoundError.__init__

__init__(
    group_name: str,
) → None

Build an error identifying the missing credential group.

Parameters

group_name
type: str

Name of the credential group that was requested.

CredentialGroupNotSpecifiedError

Inherits: CredentialError

No active credential group is configured for this project.

Methods

__init__ — Build an error explaining how to select a credential group.

CredentialGroupNotSpecifiedError.__init__

__init__() → None

Build an error explaining how to select a credential group.

CredentialInvalidError

Inherits: CredentialError

A single credential entry failed schema validation.

CredentialKeyError

Inherits: CredentialError

A credential key failed structural validation.

CredentialStoreCorruptError

Inherits: CredentialError

The credentials file cannot be parsed (invalid JSON or wrong top-level type).

CredentialVersionError

Inherits: CredentialError

The credentials file has an unsupported version number.

SecretAccessDeniedError

The caller is not authorized to access the requested secret.

SecretConflictError

A conditional secret mutation conflicts with current stored state.

SecretNotFoundError

A requested secret does not exist.

SecretStoreBusyError

The secret store could not be locked within the allowed time.

SecretStoreCorruptError

The secret store cannot be parsed or validated.

SecretStoreUnavailableError

The configured secret store cannot be reached or opened.

SecretStoreUnsafeError

The secret store fails its required security checks.