use std::path::PathBuf;
#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum ProfileError {
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("JSON error: {0}")]
Json(#[from] serde_json::Error),
#[error("Could not determine home directory")]
HomeDirNotFound,
#[error("Profile not found: {path}")]
NotFound {
path: PathBuf,
},
#[error("Invalid profile filename: {0}")]
InvalidFilename(String),
#[error("No current workspace set. Run `stash login` or `stash workspaces switch` first.")]
NoCurrentWorkspace,
#[error("Invalid workspace ID: {0}")]
InvalidWorkspaceId(String),
#[error("Workspace not found: {0}. Log in to this workspace first.")]
WorkspaceNotFound(String),
}