pub fn simulate_error(error_rate: f64) -> Result<(), Status>
Simulate various error conditions for testing