summaryrefslogtreecommitdiff
path: root/rust/scraper/src/database/error.rs
blob: f5307682af80f08c5ca281dc7142b581563d3c0c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
use std::borrow::Cow;
use thiserror::Error;

#[derive(Error, Debug)]
pub enum DatabaseError {
    #[error(transparent)]
    SQLError(#[from] sqlx::Error),
    #[error("bad input: {0}")]
    BadInput(Cow<'static, str>),
    #[error("not found")]
    NotFound,
}