Not able to skip retry for exceptions coming from microservices

We don’t want to retry for business exceptions like debit account not found
we understand that there is an option as SetDonotretry
But temporal is not giving same error the debit microservice threw.
Debit microservice threw NosuchAccountException which extended RuntimeException
But in history of Temporal we get HttpClientError$internalServerError . If we throw user defined exception X, in temporal history we see HttpClientErrorOrsomeOtherError$X

So, SetDonotretry is not working

We could see this example works if we throw RuntimeException. We mean retry did not happen as expected.

The difference between above example and our application is that we are using microservices like debit credit etc. temporal is running on Docker (using docker desktop). Microservices are not running on docker. Happy scenarios are working. Just need guidance on how to handle business exceptions which should not be retried when orchestrating microservices.

Thanks in advance

Hi @Sharvari, can you show your workflow history?
Are you throwing NosuchAccountException in your activity code? Can you show your ActivityOptions that has RetryOptions->setDoNotRetry?
Activity invocations after retries throws ActivityFailure with the original failure in its cause.

So, SetDonotretry is not working

It should work ok , we just need to see some more info to see what could be going on in your case.