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

Manually add status codes for retry #11

Closed
awwwer opened this issue Jul 17, 2022 · 3 comments
Closed

Manually add status codes for retry #11

awwwer opened this issue Jul 17, 2022 · 3 comments

Comments

@awwwer
Copy link

awwwer commented Jul 17, 2022

Would it be possible to add specific status codes beside the default codes to 'dio_smart_retry'?
For example I would like to retry on status code 401, but it is not included.
Please add an option to set optional status codes. Thank you!

@rodion-m
Copy link
Owner

rodion-m commented Jul 17, 2022

Hi @awwwer ! Thank you for contributing.
Do you find this API useful?

    RetryInterceptor(
      dio: dio,
      logPrint: print,
      retries: 3,
      retryableExtraStatuses: { status401Unauthorized }, //<--- proposal way to set extra retriable statuses
    ),

@awwwer
Copy link
Author

awwwer commented Jul 17, 2022

Hi @rodion-m ,
yes I think so!
But this is not implemented yet, right?

rodion-m added a commit that referenced this issue Jul 17, 2022
@rodion-m
Copy link
Owner

rodion-m commented Jul 17, 2022

Feature was implemented in version 1.3.1 (22dd670)

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

No branches or pull requests

2 participants