Does Slow query stat (log-queries-after) report only for successful queries?

I use log-queries-after parameter in influxdb.conf to detect slow queries. Although, when a really expensive query comes in (potential to cause HH), the number of slow queries reported increase. This makes sense since now the cluster’s performance is degraded and this affects query duration for all subsequent queries. But when the first (expensive) query came in and disrupted the system, would it have registered as a slow query in logs?

In simple terms, does slow query reporting only works for successful queries?