question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add a default retry handling to avoid retry on specific TRCP errors

See original GitHub issue

I just found that with default settings when using the react client, the query is retried 3 times despite the server sending an UNAUTHORIZED error. I think a default could be to only retry in this cases:

PARSE_ERROR: false BAD_REQUEST: false INTERNAL_SERVER_ERROR: ? UNAUTHORIZED: false FORBIDDEN: false NOT_FOUND: false METHOD_NOT_SUPPORTED: false TIMEOUT: true PRECONDITION_FAILED: false PAYLOAD_TOO_LARGE: false CLIENT_CLOSED_REQUEST: true

I can create a PR if you agree on the general idea

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ArnaudBarrecommented, Jul 30, 2022

Yes it’s easy do disable react-query behaviour. For now I ended up using:

new QueryClient({ defaultOptions: { queries: { retry: false } } })
0reactions
github-actions[bot]commented, Oct 4, 2022

This issue has been locked because it had no new activity for 14 days. If you are running into a similar issue, please create a new issue. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error handling and automatic retries in AWS Lambda
When you invoke a function, two types of error can occur. Invocation errors occur when the invocation request is rejected before your function...
Read more >
Best Practices for Retry - Denali Balser
A retry is a mechanism that monitors a request, and on the detection of failure automatically fires a repeat of the request. A...
Read more >
Istio default retry strategy is transparently retrying POST ...
Yes in a perfect world really I only want to retry gateway connection errors, or 503's which have response_flags of UC . It's...
Read more >
How AWS Lambda Retry really works - Serverless Framework
In this post, we'll analyze the AWS Lambda Retry Policy, and the different techniques and best practices to handle errors.
Read more >
Retry Handling With Spring-Retry - DZone
Whenever software components communicate with each other, there is a chance for temporary self-correcting faults. Such faults include the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found