Hi All,
I wanted to handle the api failure and retry for 2 times in LIB laye and collect the failure message as an email,
I have checked as per earlier forum reply in allexceptions to call the api again with retry count but the recursive approach does not work in allexceptions,
Is there any common menthodoligy acrross the application to handle in lib layer .
Currently set the flag false in allexception and calling method to handle for each api currently.
Hi @Preeti zade ,
As @Siya mentioned, there isn't a generic built-in approach for this. We implemented a similar retry mechanism in one of our applications, and the following pattern worked well:
Return a standardized response structure, for example:
Response- RecordId- Success (Boolean)- ErrorMessage
This approach provides a reusable, centralized retry framework, avoids duplicate retry logic across modules, and gives you complete visibility into failed integrations for monitoring and troubleshooting.Hope this will help you.RegardsDeepa
I don't think there's a generic way to do this. Since each consumed REST API is its own action, the retry logic usually has to be implemented by the caller or in a wrapper specific to that API.