# How to distinguise between activity failures

**URL:** <https://community.temporal.io/t/how-to-distinguise-between-activity-failures/11050>\
**Category:** Community Support\
**Created:** [February 17, 2024, 7:36am UTC](https://community.temporal.io/t/how-to-distinguise-between-activity-failures/11050 "2024-02-17T07:36:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhishek\_Chatterjee](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/abhishek_chatterjee/32/4866_2.png) [@Abhishek\_Chatterjee](https://community.temporal.io/u/Abhishek_Chatterjee)\
**Post date:** [February 17, 2024, 7:36am UTC](https://community.temporal.io/t/how-to-distinguise-between-activity-failures/11050/1 "2024-02-17T07:36:21Z")

</div>

I have an retriable activity sorrounded with try catch in the workflow implementation. In the catch block I want to distinguise between the below scenarios and execute next activity accordingly,

- a non-retryable exception occured
- the last retry attemp failed
- retry timeout exhausted

How to acheive it? I understand Activity.getExecutionContext().getInfo().getAttempt() returns current attempt but how to get the maximum retry count value?
