# Custom retry with backoff time - Every retry (tryMax) is counted in KO error count - How to ignore it?

**URL:** https://community.gatling.io/t/custom-retry-with-backoff-time-every-retry-trymax-is-counted-in-ko-error-count-how-to-ignore-it/5329
**Category:** Gatling (Open-Source)
**Created:** [October 30, 2019, 9:36pm UTC](https://community.gatling.io/t/custom-retry-with-backoff-time-every-retry-trymax-is-counted-in-ko-error-count-how-to-ignore-it/5329 "2019-10-30T21:36:09Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Kamalanathan\_Thandap](https://avatars.discourse-cdn.com/v4/letter/k/6bbea6/32.png) [@Kamalanathan\_Thandap](https://community.gatling.io/u/Kamalanathan_Thandap)
#### Post date: [October 30, 2019, 9:36pm UTC](https://community.gatling.io/t/custom-retry-with-backoff-time-every-retry-trymax-is-counted-in-ko-error-count-how-to-ignore-it/5329/1 "2019-10-30T21:36:09Z")

</div>

Hi,

Use-case for my system is to implement retry logic with backoff time (exponential) when there is HTTP error code 429.  
We have implemented the custom logic to achieve this using **tryMax** and **pause**.

But the issue we are facing is for each failure as part of retry, error count (KO) is added.

eg: calling SvcA with retry attempts of 5.

If first 3 retries filed, KO count is 3. This makes gatling report extremely hard to understand and also for the assertion rules.

Is there a way to suppress or mark the API call as NOT failed inside the **tryMax?**

Thanks,  
Kamal T

---

<div class="post-metadata">

### Author: ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)
#### Post date: [October 30, 2019, 10:00pm UTC](https://community.gatling.io/t/custom-retry-with-backoff-time-every-retry-trymax-is-counted-in-ko-error-count-how-to-ignore-it/5329/2 "2019-10-30T22:00:16Z")

</div>

You’ll have to implement you own logic with asLongAs.
