Skip to content

retry is not working as expected #4079

Open

Description

Hello,

I think the retry function exported from the rtk query package has not been working as expected for a while. I was able to trace back to a specific commit

To reproduce

  • wrap base query with retry
  • chrome network tab, throttle option set to "offline"
  • trigger a query in the app by clicking a button or something

Expected

  • query throws something like TypeError: network request failed
  • query is retried 5 times (default maxRetries value)
  • after 5 unsuccessful retries, no more requests are made and my code receives the TypeError

Actual

  • requests are retried indefinitely
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions