Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: provide attempt number to onRetry callback #95

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

ghost91-
Copy link
Contributor

Closes #90

});

await expect(policy.execute(s)).to.eventually.be.rejectedWith(MyErrorA);
expect(attempts).to.deep.equal([1, 2, 3]);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation says attempts should start at 0, but it starts at 1 here. I don't feel strongly either way but one of the two should be updated.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or maybe the documentation is just a little bit unclear. I would say "starting at 1" since 0 doesn't actually get emitted in the retry.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll adapt the docs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@ghost91- ghost91- force-pushed the provide-attempt-to-on-retry branch from 4ab8408 to c87512e Compare July 19, 2024 21:36
@connor4312
Copy link
Owner

Thanks!

@connor4312 connor4312 merged commit 132fbff into connor4312:master Jul 19, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Retry Policy onRetry callback does not expose the attempt number
2 participants