use thiserror::Error;
#[derive(Debug, Error)]
#[non_exhaustive]
pub enum ProfileError {
#[error(
"contributor '{query}' not found in the tga database. \
Try `tga aliases list` to see known identities, or provide the canonical email directly."
)]
ContributorNotFound {
query: String,
},
#[error(
"tga database path is not configured. \
Pass an explicit path, set TGA_DB, or run `tga collect` first."
)]
DbNotConfigured,
#[error("tga database error: {0}")]
Db(#[from] crate::core::TgaError),
#[error("tga report error: {0}")]
Report(#[from] crate::report::errors::ReportError),
#[error("git error while sampling diffs: {0}")]
Git(#[from] crate::collect::errors::CollectError),
#[error("profile configuration error: {0}")]
Config(String),
#[error("I/O error in profile pipeline: {0}")]
Io(#[from] std::io::Error),
}
pub type Result<T> = std::result::Result<T, ProfileError>;