Skip to content

Barrier retries query after activation when request fails #547

@lionlimon

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions