Does not retry wrapped PermanentError
RoryCrispin opened this issue · 3 comments
RoryCrispin commented
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
cenkalti commented
Yes. Can you send a PR?
roman-baldaev commented
Is this still relevant? I faced the same issue.
kvij commented
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?