backoff icon indicating copy to clipboard operation
backoff copied to clipboard

Does not retry wrapped PermanentError

Open RoryCrispin opened this issue 11 months ago • 3 comments

When the retry Op returns a wrapped PermanentError - the library does not recognise it as a Permanent Error (as the type cast to *PermanentError fails.

This is unexpected in my opinion. It would be more idiomatic to respect the usual Go error wrapping rules and test with errors.Is. I'll be happy to raise a PR for this change

RoryCrispin avatar Mar 19 '24 08:03 RoryCrispin

Yes. Can you send a PR?

cenkalti avatar Mar 19 '24 15:03 cenkalti

Is this still relevant? I faced the same issue.

roman-baldaev avatar Jun 14 '24 09:06 roman-baldaev

I wonder what causes this. As far as I can see the code uses errors.As which does the same traversal as errors.Is. Are you using v4 and if so can you show some example code?

kvij avatar Jul 12 '24 22:07 kvij