#[derive(Debug, thiserror::Error)] pub enum DatabaseError { #[error("An error occurred when obtaining database connection")] DatabaseConnectionError, #[error("The requested resource was not found in the database")] NotFound, #[error("A unique constraint violation occurred")] UniqueViolation, #[error("No fields were provided to be updated")] NoFieldsToUpdate, #[error("An error occurred when generating typed SQL query")] QueryGenerationFailed, // InsertFailed, #[error("An unknown error occurred")] Others, }