refactor(errors): replace silent exception handling in core packages
This commit is contained in:
1 parent
584bb2d09c
commit
47e7cb6620
21 files changed
+132
-58
No files matched your search
@@ -27,7 +27,7 @@ def test_extract_error_message():
|
||||
assert _extract_error_message(resp_openai) == "Incorrect API key."
|
||||
|
||||
resp_fallback = MagicMock()
|
||||
resp_fallback.json.side_effect = Exception("JSON parse error")
|
||||
resp_fallback.json.side_effect = ValueError("JSON parse error")
|
||||
resp_fallback.text = "Raw error text"
|
||||
assert _extract_error_message(resp_fallback) == "Raw error text"
|
||||
|
||||
|
||||
Reference in new issue
Block a user