Skip to content

Disabled query retries on oRPC client errors#42

Merged
spietras merged 1 commit into
mainfrom
orpc
Jun 5, 2026
Merged

Disabled query retries on oRPC client errors#42
spietras merged 1 commit into
mainfrom
orpc

Conversation

@spietras

@spietras spietras commented Jun 5, 2026

Copy link
Copy Markdown
Member

Closes #40

@spietras spietras requested a review from Copilot June 5, 2026 16:13
@spietras spietras self-assigned this Jun 5, 2026
@spietras spietras added cleanup Stay fresh feature New feature or request and removed cleanup Stay fresh labels Jun 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the shared TanStack Query QueryClient defaults so oRPC client-side (4xx) failures do not trigger automatic query retries, aligning retry behavior with HTTP semantics for oRPC operations.

Changes:

  • Added shouldRetryQuery helper to disable retries for ORPCError with 4xx status codes.
  • Wired the new retry function into QueryClient default query options.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/src/common/query/lib/create-query-client/utils.ts Adds shouldRetryQuery with special handling for oRPC 4xx errors.
src/src/common/query/lib/create-query-client/main.ts Applies the new retry behavior globally via defaultOptions.queries.retry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/src/common/query/lib/create-query-client/main.ts

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread src/src/common/query/lib/create-query-client/utils.ts
@spietras spietras merged commit 84b2cfd into main Jun 5, 2026
3 checks passed
@spietras spietras deleted the orpc branch June 5, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disable query retries on client errors in oRPC operations

2 participants