()
| 6 | |
| 7 | |
| 8 | def test_classifies_fake_ip_tls_error(): |
| 9 | error = classify_error( |
| 10 | "HTTPSConnectionPool(host='api.apiyi.com', port=443): " |
| 11 | "Max retries exceeded with url: /v1/models " |
| 12 | "(Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred')))", |
| 13 | context={ |
| 14 | "provider": "APIYI", |
| 15 | "base_url": "https://api.apiyi.com", |
| 16 | "endpoint": "/v1/models", |
| 17 | }, |
| 18 | ) |
| 19 | |
| 20 | assert error.code == "NETWORK_FAKE_IP_TLS" |
| 21 | assert error.retryable is True |
| 22 | assert error.status == 400 |
| 23 | assert error.diagnostics["provider"] == "APIYI" |
| 24 | assert error.diagnostics["endpoint"] == "/v1/models" |
| 25 | |
| 26 | |
| 27 | def test_classifies_proxy_unavailable(): |
nothing calls this directly
no test coverage detected