Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/olamaelcu/cacos. A headless-friendly, telemetry-infused multi-tenant PDS optimized for Olamaelcu neighborhood.olamaelcu.net
atproto atproto-pds atprotocol
Something went wrong. Try again.
123456789101112131415161718192021222324252627use miette::Diagnostic;use thiserror::Error;
#[derive(Error, Debug, Diagnostic)]pub enum PdsError { #[error("Database error: {0}")] #[diagnostic(code(cacos::db_error))] Database(sea_orm::DbErr),
#[error("Not found: {entity} with id {id}")] #[help("Check that the entity exists and the id is correct")] #[diagnostic(code(cacos::not_found))] NotFound { entity: String, id: String },
#[error("Invalid input: {0}")] #[diagnostic(code(cacos::invalid_input))] InvalidInput(String),}
impl From<sea_orm::DbErr> for PdsError { fn from(err: sea_orm::DbErr) -> Self { Self::Database(err) }}
pub type Result<T> = miette::Result<T, PdsError>;