azure-sdk-for-java icon indicating copy to clipboard operation
azure-sdk-for-java copied to clipboard

Retrying errors that can never succeed

Open smiklos opened this issue 9 months ago • 3 comments

Looking into this, passing in the custom Exponential Backoff class is the better approach as mentioned above.

As, at SDK level the azure-core SDK isn't aware of exceptions thrown by dependencies/libraries downstream.

Handling custom exceptions from other libraries in azure-core will require it to take dependency on external libraries and it will be against its design.

Resolving this issue.

Originally posted by @g2vinay in #35668

If not the core sdk then the individual dependencies like the key vault client should have their retry policies enriched with these custom errors that come from azure. I don't think it's the user who should be aware of all of these and provide a manual override as no-one want's a hanging application.

smiklos avatar Apr 09 '25 07:04 smiklos

Thanks for filing this @smiklos!

@billwert, @g2vinay, could you see if this is something that could be improved by default in azure-identity, where it uses a customized RetryPolicy that doesn't lead it into retrying failures that will never succeed. Or, see if this is something that should be pushed further upstream into msal4j.

alzimmermsft avatar Apr 09 '25 19:04 alzimmermsft

I will investigate this and get back here.

g2vinay avatar Oct 07 '25 18:10 g2vinay

@g2vinay Do you have an update on this?

samvaity avatar Oct 21 '25 23:10 samvaity