(value: &str, context: &str)
| 792 | } |
| 793 | |
| 794 | fn parse_duration_seconds_value(value: &str, context: &str) -> Result<u64, crate::error::AppError> { |
| 795 | let duration = value |
| 796 | .trim() |
| 797 | .parse::<f64>() |
| 798 | .map_err(|_| crate::error::AppError::bad_request(format!("{context} must be numeric.")))?; |
| 799 | finite_non_negative_duration_ms(duration, 1000.0, context) |
| 800 | } |
| 801 | |
| 802 | fn finite_non_negative_duration_ms( |
| 803 | value: f64, |
no test coverage detected