Errors
Exception hierarchy for QLAM Core.
Error classes and exit codes for qlam-core.
APIError
APIError(message: str = 'API error', status_code: int | None = None, response_data: Any | None = None, exit_code: int = ExitCode.UNKNOWN_ERROR)
Bases: QlamCoreError
flowchart TD
qlam_core.errors.APIError[APIError]
qlam_core.errors.errors.QlamCoreError[QlamCoreError]
qlam_core.errors.errors.QlamCoreError --> qlam_core.errors.APIError
click qlam_core.errors.APIError href "" "qlam_core.errors.APIError"
click qlam_core.errors.errors.QlamCoreError href "" "qlam_core.errors.errors.QlamCoreError"
Raised when a backend API returns an error response (HTTP status >= 400).
Source code in qlam_core/errors/errors.py
65 66 67 68 69 70 71 72 73 74 | |
AuthConfigurationError
AuthConfigurationError(message: str = 'Authentication configuration error', exit_code: int = ExitCode.AUTH_CONFIG_ERROR)
Bases: ConfigurationError
flowchart TD
qlam_core.errors.AuthConfigurationError[AuthConfigurationError]
qlam_core.errors.errors.ConfigurationError[ConfigurationError]
qlam_core.errors.errors.QlamCoreError[QlamCoreError]
qlam_core.errors.errors.ConfigurationError --> qlam_core.errors.AuthConfigurationError
qlam_core.errors.errors.QlamCoreError --> qlam_core.errors.errors.ConfigurationError
click qlam_core.errors.AuthConfigurationError href "" "qlam_core.errors.AuthConfigurationError"
click qlam_core.errors.errors.ConfigurationError href "" "qlam_core.errors.errors.ConfigurationError"
click qlam_core.errors.errors.QlamCoreError href "" "qlam_core.errors.errors.QlamCoreError"
Raised when an authentication provider is misconfigured.
Source code in qlam_core/errors/errors.py
54 55 56 57 58 59 | |
AuthenticationError
AuthenticationError(message: str = 'Authentication failed', exit_code: int = ExitCode.AUTH_ERROR)
Bases: QlamCoreError
flowchart TD
qlam_core.errors.AuthenticationError[AuthenticationError]
qlam_core.errors.errors.QlamCoreError[QlamCoreError]
qlam_core.errors.errors.QlamCoreError --> qlam_core.errors.AuthenticationError
click qlam_core.errors.AuthenticationError href "" "qlam_core.errors.AuthenticationError"
click qlam_core.errors.errors.QlamCoreError href "" "qlam_core.errors.errors.QlamCoreError"
Raised when authentication fails (credentials rejected, expired, etc.).
Source code in qlam_core/errors/errors.py
36 37 38 39 | |
ConfigurationError
ConfigurationError(message: str = 'Configuration error', exit_code: int = ExitCode.USAGE_ERROR)
Bases: QlamCoreError
flowchart TD
qlam_core.errors.ConfigurationError[ConfigurationError]
qlam_core.errors.errors.QlamCoreError[QlamCoreError]
qlam_core.errors.errors.QlamCoreError --> qlam_core.errors.ConfigurationError
click qlam_core.errors.ConfigurationError href "" "qlam_core.errors.ConfigurationError"
click qlam_core.errors.errors.QlamCoreError href "" "qlam_core.errors.errors.QlamCoreError"
Raised when there's an issue with configuration.
Source code in qlam_core/errors/errors.py
45 46 47 48 | |
ExitCode
Bases: IntEnum
flowchart TD
qlam_core.errors.ExitCode[ExitCode]
click qlam_core.errors.ExitCode href "" "qlam_core.errors.ExitCode"
Exit codes for qlam-core errors.
from_http_status
classmethod
from_http_status(status_code: int) -> 'ExitCode'
Map HTTP status codes to exit codes.
Source code in qlam_core/errors/exit_codes.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | |
get_description
classmethod
get_description(exit_code: int) -> str
Get a human-readable description of an exit code.
Source code in qlam_core/errors/exit_codes.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
FileSystemError
FileSystemError(message: str = 'File system error', exit_code: int = ExitCode.UNKNOWN_ERROR)
Bases: QlamCoreError
flowchart TD
qlam_core.errors.FileSystemError[FileSystemError]
qlam_core.errors.errors.QlamCoreError[QlamCoreError]
qlam_core.errors.errors.QlamCoreError --> qlam_core.errors.FileSystemError
click qlam_core.errors.FileSystemError href "" "qlam_core.errors.FileSystemError"
click qlam_core.errors.errors.QlamCoreError href "" "qlam_core.errors.errors.QlamCoreError"
Raised when file system operations fail.
Source code in qlam_core/errors/errors.py
98 99 100 101 | |
NetworkError
NetworkError(message: str = 'Network error', exit_code: int = ExitCode.NETWORK_ERROR)
Bases: QlamCoreError
flowchart TD
qlam_core.errors.NetworkError[NetworkError]
qlam_core.errors.errors.QlamCoreError[QlamCoreError]
qlam_core.errors.errors.QlamCoreError --> qlam_core.errors.NetworkError
click qlam_core.errors.NetworkError href "" "qlam_core.errors.NetworkError"
click qlam_core.errors.errors.QlamCoreError href "" "qlam_core.errors.errors.QlamCoreError"
Raised when network operations fail.
Source code in qlam_core/errors/errors.py
89 90 91 92 | |
QlamCoreError
QlamCoreError(message: str, exit_code: int = ExitCode.UNKNOWN_ERROR)
Bases: Exception
flowchart TD
qlam_core.errors.QlamCoreError[QlamCoreError]
click qlam_core.errors.QlamCoreError href "" "qlam_core.errors.QlamCoreError"
Base exception for qlam-core errors.
Contract: - Always carries a user-facing message. - Always carries a stable exit code suitable for application boundaries.
Library code may raise these errors to request specific UX and exit-code behavior from consumer applications.
Source code in qlam_core/errors/errors.py
27 28 29 30 | |
ValidationError
ValidationError(message: str = 'Validation error', exit_code: int = ExitCode.VALIDATION_ERROR)
Bases: QlamCoreError
flowchart TD
qlam_core.errors.ValidationError[ValidationError]
qlam_core.errors.errors.QlamCoreError[QlamCoreError]
qlam_core.errors.errors.QlamCoreError --> qlam_core.errors.ValidationError
click qlam_core.errors.ValidationError href "" "qlam_core.errors.ValidationError"
click qlam_core.errors.errors.QlamCoreError href "" "qlam_core.errors.errors.QlamCoreError"
Raised when input validation fails.
Source code in qlam_core/errors/errors.py
80 81 82 83 | |