omni_orchestrator/worker_autoscaler/
error.rs

1use thiserror::Error;
2
3/// Errors that can occur during autoscaling operations
4#[derive(Error, Debug)]
5pub enum AutoscalerError {
6    #[error("Invalid metric value: {0}")]
7    InvalidMetricValue(String),
8    
9    #[error("Failed to apply scaling decision: {0}")]
10    ScalingFailed(String),
11    
12    #[error("Metric not found: {0}")]
13    MetricNotFound(String),
14    
15    #[error("Insufficient node capacity: {0}")]
16    InsufficientCapacity(String),
17    
18    #[error("Director communication failed: {0}")]
19    DirectorError(String),
20    
21    #[error("Node not found: {0}")]
22    NodeNotFound(String),
23    
24    #[error("VM not found: {0}")]
25    VMNotFound(String),
26}