km_to_sql/
error.rs

1use thiserror::Error as ThisError;
2
3#[derive(ThisError, Debug)]
4pub enum Error {
5    #[error("Failed to parse metadata: {0}")]
6    ParseMetadata(#[from] serde_json::Error),
7
8    #[cfg(feature = "postgres")]
9    #[error("Postgres error: {0}")]
10    Postgres(#[from] tokio_postgres::Error),
11}
12
13pub type Result<T> = std::result::Result<T, Error>;