Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Add axios retry interceptor #269

Merged
merged 2 commits into from
Aug 16, 2022

Conversation

georgi-l95
Copy link
Collaborator

@georgi-l95 georgi-l95 commented Aug 11, 2022

Signed-off-by: georgi-l95 glazarov95@gmail.com

Description:
Add an axios retry interceptor that will retry failures that aren't a result of user input. Default values for retries, which can be customised. Exponential back-off

Related issue(s):

Fixes #265

Notes for reviewer:
Extended some of the tests to fit this new functionality. Others which test for bad requests cover this already.

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@georgi-l95 georgi-l95 self-assigned this Aug 11, 2022
@georgi-l95 georgi-l95 linked an issue Aug 11, 2022 that may be closed by this pull request
@georgi-l95 georgi-l95 changed the title Add axios interceptor Add axios retry interceptor Aug 11, 2022
@georgi-l95 georgi-l95 marked this pull request as ready for review August 12, 2022 07:21
Copy link
Collaborator

@natanasow natanasow left a comment

Choose a reason for hiding this comment

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

LG, some nits

packages/providers/src.ts/base-provider.ts Outdated Show resolved Hide resolved
packages/providers/src.ts/base-provider.ts Outdated Show resolved Hide resolved
packages/providers/src.ts/base-provider.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@ar-conmit ar-conmit left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: georgi-l95 <glazarov95@gmail.com>

test for options extended

Signed-off-by: georgi-l95 <glazarov95@gmail.com>

fix

Signed-off-by: georgi-l95 <glazarov95@gmail.com>

fix

Signed-off-by: georgi-l95 <glazarov95@gmail.com>

fix

Signed-off-by: georgi-l95 <glazarov95@gmail.com>

resolve comments

Signed-off-by: georgi-l95 <glazarov95@gmail.com>
@georgi-l95 georgi-l95 force-pushed the 265-add-retry-logic-to-mirror-node-requests branch from 8cd6895 to 1a87125 Compare August 15, 2022 11:28
Signed-off-by: georgi-l95 <glazarov95@gmail.com>
@georgi-l95 georgi-l95 merged commit 41b4eb7 into master Aug 16, 2022
@georgi-l95 georgi-l95 deleted the 265-add-retry-logic-to-mirror-node-requests branch August 16, 2022 05:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add configurable retry logic to mirror node requests
4 participants