craft_store.errors module

Craft Store errors.

exception craft_store.errors.CandidTokenKindError(url)[source]

Bases: craft_store.errors.CraftStoreError

Error raised when the token kind is missing from the discharged macaroon.

Parameters

url (str) –

exception craft_store.errors.CandidTokenTimeoutError(url)[source]

Bases: craft_store.errors.CraftStoreError

Error raised when timeout is reached trying to discharge a macaroon.

Parameters

url (str) –

exception craft_store.errors.CandidTokenValueError(url)[source]

Bases: craft_store.errors.CraftStoreError

Error raised when the token value is missing from the discharged macaroon.

Parameters

url (str) –

exception craft_store.errors.CraftStoreError(message, resolution=None)[source]

Bases: Exception

Base class error for craft-store.

Parameters
  • message (str) –

  • resolution (Optional[str]) –

exception craft_store.errors.CredentialsAlreadyAvailable(application, host)[source]

Bases: craft_store.errors.CraftStoreError

Error raised when credentials are already found in the keyring.

Parameters
  • application (str) –

  • host (str) –

exception craft_store.errors.CredentialsNotParseable(msg='Expected base64 encoded credentials')[source]

Bases: craft_store.errors.CraftStoreError

Error raised when credentials are not parseable.

Parameters

msg (str) –

exception craft_store.errors.CredentialsUnavailable(application, host)[source]

Bases: craft_store.errors.CraftStoreError

Error raised when credentials are not found in the keyring.

Parameters
  • application (str) –

  • host (str) –

exception craft_store.errors.NetworkError(exception)[source]

Bases: craft_store.errors.CraftStoreError

Error to raise on network or infrastructure issues.

The original exception is used to potentially craft a user friendly error message to be used for brief.

Parameters

exception (Exception) – original exception raised.

Variables

exception – original exception raised.

exception craft_store.errors.NoKeyringError[source]

Bases: craft_store.errors.CraftStoreError

Error raised when no keyring can be used.

class craft_store.errors.StoreErrorList(error_list)[source]

Bases: object

Error List returned from the Store.

Parameters

error_list (List[Dict[str, str]]) –

exception craft_store.errors.StoreServerError(response)[source]

Bases: craft_store.errors.CraftStoreError

Error to raise on infrastructure issues from error codes above 500.

Parameters

response (Response) – the response from a requests.Request.

Variables
  • response – the response from a requests.Request.

  • error_list – list of errors returned by the Store StoreErrorList.