Fail queries after too many ExchangeClient errors

A query will fail if errors continue for longer than the minimum duration.