Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Feature: Implement retries mechanism #11

Merged
merged 2 commits into from
May 15, 2024

Conversation

DimaZhukovsky
Copy link
Contributor

Description

Sometimes requests could fail because of network, in this case we can add option retries (default 0), which tries to resend request n-times and throws error is all attempts failed.

Testing

To simulate bad network I tried to close socket with 20% chance

Before

before.mov

After

after.mov

Also added unit tests

@DimaZhukovsky DimaZhukovsky requested review from awwit and swellmike May 14, 2024 15:27
src/client.ts Outdated Show resolved Hide resolved
@DimaZhukovsky DimaZhukovsky merged commit 74cc057 into master May 15, 2024
1 check passed
@DimaZhukovsky DimaZhukovsky deleted the feat/implement-retries-mechanism branch May 15, 2024 08:53
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.

3 participants