# An Istio Telemetry resource filters access logs with response.code >= 500, and failed connections never appear in the logs. Which filter expression also keeps them?

Istio, Medium (Advanced), Troubleshooting. https://k8wiz.com/uquiz/an-istio-telemetry-resource-filters-access-logs-with-responsecode-500-and-failed-connections-never-appear-in-the-logs-which-filt

- A. has(response.code) && response.code >= 500
- B. response.code >= 500 || response.code == 0
- C. !has(response.code) || response.code >= 500
- D. response.code >= 500 && !has(response.flags)

**Answer:** !has(response.code) || response.code >= 500

**Explanation:** When a connection fails, there is no response.code attribute at all, so a filter that only compares the code drops those entries. The Istio docs recommend !has(response.code) || response.code >= 500 to keep both server errors and failed connections. Testing for code 0 does not help because the attribute is missing, not zero.
