()
| 224 | |
| 225 | #[test] |
| 226 | fn transient_error_classification() { |
| 227 | let t = |s: &str| is_transient_error(&anyhow::anyhow!("{s}")); |
| 228 | // Transient network errors → retry. |
| 229 | assert!(t("error sending request for url: operation timed out")); |
| 230 | assert!(t("connection reset by peer")); |
| 231 | assert!(t("LLM error: connection closed before message completed")); |
| 232 | assert!(t("tls handshake eof")); |
| 233 | // Real application errors → do NOT retry. |
| 234 | assert!(!t("invalid api key")); |
| 235 | assert!(!t("model not found")); |
| 236 | assert!(!t("context length exceeded")); |
| 237 | } |
| 238 | |
| 239 | // ======================================================================== |
| 240 | // RetryConfig unit tests |
nothing calls this directly
no test coverage detected