devpulse 1.0.0

Developer diagnostics: HTTP timing, build artifact cleanup, environment health checks, port scanning, PATH analysis, and config format conversion
//! Unified error types for all devpulse modules.
//!
//! Each module defines its own specific error type with thiserror.
//! DevpulseError wraps them all via #[from] conversions for clean propagation.

use thiserror::Error;

use crate::convert::ConvertError;
use crate::doctor::DoctorError;
use crate::env::EnvError;
use crate::http::HttpError;
use crate::ports::PortsError;
use crate::sweep::SweepError;

/// Top-level error type unifying all module errors.
/// Used as the return type from main dispatch logic.
#[derive(Error, Debug)]
pub enum DevpulseError {
    /// HTTP timing module error
    #[error("{0}")]
    Http(#[from] HttpError),

    /// Sweep/cleanup module error
    #[error("{0}")]
    Sweep(#[from] SweepError),

    /// Doctor health-check module error
    #[error("{0}")]
    Doctor(#[from] DoctorError),

    /// Port scanning module error
    #[error("{0}")]
    Ports(#[from] PortsError),

    /// Environment inspection module error
    #[error("{0}")]
    Env(#[from] EnvError),

    /// Config converter module error
    #[error("{0}")]
    Convert(#[from] ConvertError),
}