omni_orchestrator/db_manager/
error.rs1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum DatabaseError {
5 #[error("Failed to connect to database: {0}")]
6 ConnectionError(String),
7
8 #[error("Migration failed: {0}")]
9 MigrationError(String),
10
11 #[error("Database '{0}' not found")]
12 DatabaseNotFound(String),
13
14 #[error("Schema version mismatch: current {current}, target {target}")]
15 SchemaVersionMismatch { current: String, target: String },
16
17 #[error("SQL error: {0}")]
18 SqlxError(#[from] sqlx::Error),
19
20 #[error("Other error: {0}")]
21 Other(String),
22}