Skip to content

Barrier retries query after activation when request fails #547

Description

@lionlimon

I'm experiencing an issue with barrier behavior. When using a barrier like this:

const getTokenBeforeAuthBarrier = createBarrier({
  active: combine($token, $now, isTokenExpired),
  perform: [renewJWTMutation],
});

I encounter unexpected query retry behavior when the request fails with any error.
I think we need a parameter like { retryRequestAfterError: false } to prevent this behavior, or { retryRequestFilter: (requestResult) => ... }.

example: https://stackblitz.com/edit/vitejs-vite-gu6qvqci?file=src%2FApp.tsx

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions