1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
pub use auth::AuthError;
use displaydoc::Display;
use std::sync::Arc;
use thiserror::Error;
#[derive(Clone, Debug, Display, Error)]
pub enum DatabaseError {
/// Generic database error: {0:?}
DatabaseError(Arc<sqlx::error::Error>),
}
impl From<sqlx::error::Error> for DatabaseError {
fn from(e: sqlx::error::Error) -> DatabaseError {
Self::DatabaseError(e.into())
}
}