outlet_postgres/
error.rs

1//! Error types for outlet-postgres.
2
3use thiserror::Error;
4
5/// Errors that can occur when using the PostgreSQL handler.
6#[derive(Error, Debug)]
7pub enum PostgresHandlerError {
8    /// Database connection error.
9    #[error("Failed to connect to database: {0}")]
10    Connection(#[from] sqlx::Error),
11
12    /// Database migration error.
13    #[error("Database migration failed: {0}")]
14    Migration(sqlx::migrate::MigrateError),
15
16    /// Database query error.
17    #[error("Database query failed: {0}")]
18    Query(sqlx::Error),
19
20    /// JSON serialization error.
21    #[error("JSON serialization failed: {0}")]
22    Json(#[from] serde_json::Error),
23}