Skip to main content

matrix_bridge_telegram/db/
error.rs

1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum DatabaseError {
5    #[error("Connection error: {0}")]
6    Connection(String),
7
8    #[error("Query error: {0}")]
9    Query(String),
10
11    #[error("Migration error: {0}")]
12    Migration(String),
13
14    #[error("Not found: {0}")]
15    NotFound(String),
16
17    #[error("Duplicate entry: {0}")]
18    Duplicate(String),
19}