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: http-agent retries calls #632

Merged
merged 10 commits into from Sep 29, 2022
Merged

feat: http-agent retries calls #632

merged 10 commits into from Sep 29, 2022

Conversation

krpeacock
Copy link
Contributor

Description

Since there can be occasional errors while calling the IC that can simply be resolved by retrying, feature adds a default of 3 retries after an initial failure. The promise will stay pending until either the request resolves, or the retries have completed, after which it will throw an error.

Adds retryTimes to HttpAgentOptions type. Error messages will be logged under console.warn until the final retry.

Questions for discussion:

  • Should we have more configuration? E.G.
    • retry: { disableRetry, retryTimes, suppressWarnings, concurrent }

Fixes SDK-724

How Has This Been Tested?

New unit tests and e2e test in Counter

Checklist:

  • My changes follow the guidelines in CONTRIBUTING.md.
  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

@krpeacock krpeacock requested a review from a team as a code owner September 27, 2022 22:51
@krpeacock
Copy link
Contributor Author

I've disabled the problem tests that weren't related to changes here. I'll create a separate PR fixing them

@krpeacock krpeacock merged commit 2805ad8 into main Sep 29, 2022
@krpeacock krpeacock deleted the SDK-724-retry-calls branch September 29, 2022 15:40
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.

None yet

2 participants