https://istio.io/docs/reference/config/networking/v1alpha3/destination-rule/#OutlierDetection
Under consecutiveErrors: 502, 503, and 504s only, 500 codes will not trigger the outlier detection
But in the docs above:
For HTTP services, hosts that continually return 5xx errors for API calls are ejected from the pool for a pre-defined period of time.
So sounds like the docs are incorrect here. It will only work for 502/503/504 from looking at the code and #617