test(observability): cover custom_openai Ollama timeout chain (#3660)

This commit is contained in:
Zhang
2026-06-16 17:06:59 +05:30
committed by GitHub
parent 7dbbb9d71c
commit 171b5ee140
+14
View File
@@ -3152,6 +3152,20 @@ mod tests {
}
}
#[test]
fn custom_openai_ollama_timeout_fallback_chain_is_network_unreachable() {
let chain =
"custom_openai chat completions transport error: error sending request for url \
(http://localhost:11434/v1/chat/completions): operation timed out \
(responses fallback failed: custom_openai API error (404 Not Found): \
{\"error\":\"not found\"})";
assert_eq!(
expected_error_kind(chain),
Some(ExpectedErrorKind::NetworkUnreachable),
"local Ollama timeout plus responses fallback failure must not page Sentry"
);
}
#[test]
fn does_not_classify_unrelated_provider_errors_as_network() {
// Status-bearing provider failures (404, 500, …) are surfaced via