http_interceptor icon indicating copy to clipboard operation
http_interceptor copied to clipboard

Allow 'maxRetryAttempts' to be flexible according to response status

Open ayyysh04 opened this issue 1 year ago • 4 comments

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 avatar Mar 31 '24 15:03 ayyysh04

@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

ayyysh04 avatar Mar 31 '24 15:03 ayyysh04

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

CodingAleCR avatar Apr 10 '24 02:04 CodingAleCR

@all-contributors add @ayyysh04 for ideas

CodingAleCR avatar Jul 07 '24 00:07 CodingAleCR

@CodingAleCR

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

allcontributors[bot] avatar Jul 07 '24 00:07 allcontributors[bot]