aioimmich.exceptions API documentation
Description: aioimmich exceptions.

# Module `aioimmich.exceptions`

aioimmich exceptions.

## Classes

`class ImmichError (result: dict)`
  Expand source code

      class ImmichError(Exception):
          """Base class for immich errors."""

          def __init__(self, result: dict):
              """Initialize JSON RPC errors."""
              message = result["message"]
              error = result["error"]
              code = result["statusCode"]
              correlation_id = result["correlationId"]
              super().__init__(
                  f"{message} (error: '{error}' code: '{code}' correlation_id: '{correlation_id}')"
              )

  Base class for immich errors.

  Initialize JSON RPC errors.

  ### Ancestors

  - builtins.Exception
  - builtins.BaseException

  ### Subclasses

  - ImmichForbiddenError
  - ImmichNotFoundError
  - ImmichUnauthorizedError
`class ImmichForbiddenError (result: dict)`
  Expand source code

      class ImmichForbiddenError(ImmichError):
          """Forbidden error."""

  Forbidden error.

  Initialize JSON RPC errors.

  ### Ancestors

  - ImmichError
  - builtins.Exception
  - builtins.BaseException
`class ImmichNotFoundError (result: dict)`
  Expand source code

      class ImmichNotFoundError(ImmichError):
          """Not found error."""

  Not found error.

  Initialize JSON RPC errors.

  ### Ancestors

  - ImmichError
  - builtins.Exception
  - builtins.BaseException
`class ImmichUnauthorizedError (result: dict)`
  Expand source code

      class ImmichUnauthorizedError(ImmichError):
          """Unauthorized error."""

  Unauthorized error.

  Initialize JSON RPC errors.

  ### Ancestors

  - ImmichError
  - builtins.Exception
  - builtins.BaseException