From 51b5a6523ddc40170661b0f2b799ed2ba63c4713 Mon Sep 17 00:00:00 2001 From: Souravrajvi0 <144546710+Souravrajvi0@users.noreply.github.com> Date: Mon, 20 Jul 2026 23:14:02 +0530 Subject: [PATCH] test(openai): cover non-string guard in connection error checker --- .../litellm_core_utils/test_exception_mapping_utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_litellm/litellm_core_utils/test_exception_mapping_utils.py b/tests/test_litellm/litellm_core_utils/test_exception_mapping_utils.py index 26153e360e9..bfd6eb9a3fc 100644 --- a/tests/test_litellm/litellm_core_utils/test_exception_mapping_utils.py +++ b/tests/test_litellm/litellm_core_utils/test_exception_mapping_utils.py @@ -728,6 +728,8 @@ def test_openai_genuine_500_still_maps_to_internal_server_error(): ("Connection refused", True), ("The server had an error processing your request.", False), ("invalid_request_error", False), + (None, False), + (123, False), ], ) def test_is_error_str_connection_error(error_str, expected):