gearbox_rs_postgres/
error.rs1use thiserror::Error;
2
3#[derive(Debug, Error)]
4#[non_exhaustive]
5pub enum PgError {
6 #[error("Pool initialization failed: {0}")]
7 PoolInitializeError(String),
8
9 #[error("Database connection failed")]
10 ConnectionFailed(#[source] sqlx::Error),
11
12 #[error("Migration failed")]
13 MigrationFailed(#[from] sqlx::migrate::MigrateError),
14
15 #[error("PSQL Error")]
16 PsqlError(#[from] sqlx::Error),
17
18 #[error("No pool registered for schema '{0}'")]
19 SchemaNotFound(String),
20
21 #[error("Entity not found")]
22 NotFound,
23}