Exceptions

Exception classes for litestar-vite error handling.

All exceptions inherit from the base LitestarViteError class for easy catching of library-specific errors.

Available Exceptions

LitestarViteError

Base exception for all litestar-vite errors.

MissingDependencyError

Raised when a required package is not installed (e.g., fsspec for deployment).

ViteExecutableNotFoundError

Raised when the Vite executable cannot be found.

ViteExecutionError

Raised when Vite command execution fails.

ViteProcessError

Raised when the Vite dev server process fails to start or stop.

ManifestNotFoundError

Raised when the Vite manifest file is not found at the expected location.

AssetNotFoundError

Raised when a requested asset is not found in the manifest.

Litestar-Vite exception classes.

exception litestar_vite.exceptions.AssetNotFoundError[source]

Bases: LitestarViteError

Raised when an asset is not found in the manifest.

__init__(file_path: str, manifest_path: str) None[source]
exception litestar_vite.exceptions.LitestarViteError[source]

Bases: Exception

Base exception for Litestar-Vite related errors.

exception litestar_vite.exceptions.ManifestNotFoundError[source]

Bases: LitestarViteError

Raised when the manifest file is not found.

__init__(manifest_path: str) None[source]
exception litestar_vite.exceptions.MissingDependencyError[source]

Bases: LitestarViteError, ImportError

Raised when a package is not installed but required.

__init__(package: str, install_package: str | None = None) None[source]

Initialize the exception.

Parameters:
  • package – The name of the missing package.

  • install_package – Optional alternative package name for installation.

exception litestar_vite.exceptions.ViteExecutableNotFoundError[source]

Bases: LitestarViteError

Raised when the vite executable is not found.

__init__(executable: str) None[source]
exception litestar_vite.exceptions.ViteExecutionError[source]

Bases: LitestarViteError

Raised when the vite execution fails.

__init__(command: list[str], return_code: int, stderr: str) None[source]
exception litestar_vite.exceptions.ViteProcessError[source]

Bases: LitestarViteError

Raised when the Vite process fails to start or stop.

__init__(message: str, command: list[str] | None = None, exit_code: int | None = None, stderr: str | None = None, stdout: str | None = None) None[source]