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

Allow 'maxRetryAttempts' to be flexible according to response status #143

Open
ayyysh04 opened this issue Mar 31, 2024 · 4 comments
Open
Assignees

Comments

@ayyysh04
Copy link

Is your feature request related to a problem? Please describe.
If a programmer wants to retry 3 times in case of '400' status error and 1 time in case of '401' error ,he will not be able to do so due to restriction of current 'maxRetryAttempts' method

Describe the solution you'd like
Will be adding a 'response' as argument to 'maxRetryAttempts' method ,so that programmer can decide the retry count according to response status

Describe alternatives you've considered
Above solution will work

Additional context
[NONE]

@ayyysh04
Copy link
Author

@CodingAleCR if aligned ,kindly assign this ticket to me and merge the PR as asap.Currently our app uses interceptor beta version ,but not able to adopt this use case

@CodingAleCR
Copy link
Owner

I'll take a closer look, but it does seem to align with the purposes of the package. Thank you for contributing!

@CodingAleCR
Copy link
Owner

@all-contributors add @ayyysh04 for ideas

Copy link
Contributor

@CodingAleCR

I've put up a pull request to add @ayyysh04! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants