Skip to content

Add retry wrapper example#3

Open
timursevimli wants to merge 1 commit intoHowProgrammingWorks:masterfrom
timursevimli:master
Open

Add retry wrapper example#3
timursevimli wants to merge 1 commit intoHowProgrammingWorks:masterfrom
timursevimli:master

Conversation

@timursevimli
Copy link
Member

No description provided.

} catch (err) {
errors.push(err);
if (recovery) {
await recovery(...args).catch((err) => {
Copy link
Member Author

Choose a reason for hiding this comment

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

If remove the .catch method from recovery function and use try-catch construction, this wrapper will be compatible with synchronous code

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.

1 participant