Exceptions¶
Exception classes used throughout the Bloomy SDK.
Base Exception¶
BloomyError
¶
Bases: Exception
Base exception for all Bloomy-related errors.
Authentication Errors¶
AuthenticationError
¶
Bases: BloomyError
Raised when authentication fails.
Raised when username/password authentication fails. This typically occurs when using Configuration.configure_api_key() with invalid credentials.
Example:
from bloomy import Configuration, AuthenticationError
try:
config = Configuration()
config.configure_api_key(
username="user@example.com",
password="wrong_password"
)
except AuthenticationError as e:
print(f"Authentication failed: {e}")
API Errors¶
APIError
¶
Bases: BloomyError
Raised when API returns an error response.
Initialize API error with message and optional status code.
Parameters:
-
message(str) –The error message
-
status_code(int | None, default:None) –The HTTP status code if available
Source code in src/bloomy/exceptions.py
Functions¶
Configuration Errors¶
ConfigurationError
¶
Bases: BloomyError
Raised when there's an issue with configuration.