backoff
backoff copied to clipboard
Does not retry wrapped PermanentError
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
Yes. Can you send a PR?
Is this still relevant? I faced the same issue.
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?