33 lines
3.4 KiB
Rust
33 lines
3.4 KiB
Rust
// file: crates/ksp-store-lib/src/error.rs
|
|
// version: 5
|
|
|
|
/// Error code reserved for operations attempted after a Store backend has entered its closed state.
|
|
pub const ERROR_CODE_BACKEND_CLOSED: ksp_store_api::ErrorCode = ksp_store_api::ErrorCode::new("store", "backend_closed");
|
|
/// Error code used when a known Store backend was selected but its Cargo feature is not compiled.
|
|
pub const ERROR_CODE_BACKEND_NOT_COMPILED: ksp_store_api::ErrorCode = ksp_store_api::ErrorCode::new("store", "backend_not_compiled");
|
|
/// Error code used when a compiled Store backend cannot complete its bounded opening lifecycle.
|
|
pub const ERROR_CODE_BACKEND_OPEN_FAILED: ksp_store_api::ErrorCode = ksp_store_api::ErrorCode::new("store", "backend_open_failed");
|
|
/// Error code used when the PostgreSQL backend rejects or cannot normalize its physical connection configuration.
|
|
pub const ERROR_CODE_POSTGRES_CONFIG_INVALID: ksp_store_api::ErrorCode = ksp_store_api::ErrorCode::new("store", "postgres_config_invalid");
|
|
/// Error code used when PostgreSQL physical connection establishment fails without exposing remote or credential details.
|
|
pub const ERROR_CODE_POSTGRES_CONNECT_FAILED: ksp_store_api::ErrorCode = ksp_store_api::ErrorCode::new("store", "postgres_connect_failed");
|
|
/// Error code used when a lightweight PostgreSQL health/readiness probe fails safely.
|
|
pub const ERROR_CODE_POSTGRES_HEALTH_FAILED: ksp_store_api::ErrorCode = ksp_store_api::ErrorCode::new("store", "postgres_health_failed");
|
|
/// Error code used when PostgreSQL migration/bootstrap execution fails without exposing server text or SQL.
|
|
pub const ERROR_CODE_POSTGRES_MIGRATION_FAILED: ksp_store_api::ErrorCode = ksp_store_api::ErrorCode::new("store", "postgres_migration_failed");
|
|
/// Error code used when persisted PostgreSQL migration history diverges from the embedded immutable KSP history.
|
|
pub const ERROR_CODE_POSTGRES_MIGRATION_MISMATCH: ksp_store_api::ErrorCode = ksp_store_api::ErrorCode::new("store", "postgres_migration_mismatch");
|
|
/// Error code used when a bounded PostgreSQL pool wait, create or recycle operation reaches its deadline.
|
|
pub const ERROR_CODE_POSTGRES_POOL_TIMEOUT: ksp_store_api::ErrorCode = ksp_store_api::ErrorCode::new("store", "postgres_pool_timeout");
|
|
/// Error code used when PostgreSQL cannot represent a requested RAW retention compaction state.
|
|
pub const ERROR_CODE_POSTGRES_RETENTION_COMPACTION_UNSUPPORTED: ksp_store_api::ErrorCode =
|
|
ksp_store_api::ErrorCode::new("store", "postgres_retention_compaction_unsupported");
|
|
/// Error code used when PostgreSQL history contains a migration newer than this Store runtime understands.
|
|
pub const ERROR_CODE_POSTGRES_SCHEMA_NEWER: ksp_store_api::ErrorCode = ksp_store_api::ErrorCode::new("store", "postgres_schema_newer");
|
|
/// Error code used when verified PostgreSQL TLS setup or negotiation cannot be completed safely.
|
|
pub const ERROR_CODE_POSTGRES_TLS_FAILED: ksp_store_api::ErrorCode = ksp_store_api::ErrorCode::new("store", "postgres_tls_failed");
|
|
/// Error code used when backend-neutral Store settings violate runtime bounds or invariants.
|
|
pub const ERROR_CODE_SETTINGS_INVALID: ksp_store_api::ErrorCode = ksp_store_api::ErrorCode::new("store", "settings_invalid");
|
|
/// Error code used when a Store cannot complete its explicit shutdown inside the configured bound.
|
|
pub const ERROR_CODE_SHUTDOWN_TIMEOUT: ksp_store_api::ErrorCode = ksp_store_api::ErrorCode::new("store", "shutdown_timeout");
|