use capsula_core::error::CapsulaError;
use thiserror::Error;
#[derive(Debug, Error)]
pub enum MachineHookError {
#[error("Failed to get OS information")]
OsInfoError,
#[error("Failed to get hostname")]
HostnameError,
#[error("Failed to serialize machine hook: {0}")]
Serialization(#[from] serde_json::Error),
}
impl From<MachineHookError> for CapsulaError {
fn from(err: MachineHookError) -> Self {
Self::HookFailed {
hook: "capture-machine".to_string(),
source: Box::new(err),
}
}
}