Free tools Windows power users keep installed
One-click scans. No signup required.
Don’t retry a failed request just because it returned an error or timed out. First preserve what happened, determine whether the server may already have applied the operation, and check whether replay is safe. If it is, follow the API’s delay guidance and use a bounded retry policy.
What to check before retrying
- Save evidence from the attempt. Record the HTTP method and target, status code if received, response headers such as
Retry-After, API error code or response body, elapsed time, and request or correlation ID. For a transport failure, note what is known about the connection and whether the request may have been sent. Do not log secrets or sensitive request bodies. These are useful diagnostic fields; see O’Reilly’s general discussion of HTTP logging. - Classify the failure. Distinguish an HTTP response from DNS, TLS, connection, or timeout failures. Interpret the response using the API’s own documentation: status codes help classify the problem but do not establish whether a state-changing operation took effect.
- Assess replay safety. Ask whether repeating the same request has the same intended effect, whether the API documents an idempotency key or deduplication mechanism, or whether you can check current state to determine if the first attempt succeeded.
- Choose a delay and stopping point. Respect any server-provided
Retry-After, set a timeout for each outbound call, and keep retries within an overall deadline or attempt budget. Check whether your client library already retries.
This sequence follows the general guidance in RFC 9110, Microsoft’s transient-fault guidance, and AWS retry and backoff guidance. The right policy for a specific API still depends on its documented contract, limits, and the operation’s deadline.
Why a timeout can leave the outcome unknown
A timeout or dropped connection means the client did not receive a response; it does not prove the server did no work. The request may have reached the server and been applied before the response was lost. Replaying a create, payment, order, or other state-changing operation in that situation can cause a duplicate effect.
RFC 9110 says a client should not automatically retry a non-idempotent request unless it can establish that the semantics are safe or detect that the original request was never applied. When the outcome is ambiguous, verify the operation’s state or use the API’s documented deduplication mechanism before sending it again. AWS’s discussion of safe idempotent APIs explains the duplicate-resource risk of retrying an ambiguous create.
Use HTTP methods as evidence, not as a substitute for the API contract
HTTP idempotency concerns the intended effect of repeated requests. RFC 9110 identifies safe methods, PUT, and DELETE as idempotent in that sense, although an implementation can still have additional side effects. A method alone does not tell you every detail of an API’s behavior or guarantee that a particular request is safe to replay.
For POST and other non-idempotent operations, look for an idempotency key or deduplication feature only if the API documents one. Otherwise, check whether you can establish the first attempt’s result before replaying it. Do not assume a key is supported or that it works the same way across services.
Rank #2
Interpret the error without overreading it
A 429 commonly signals throttling, and some 5xx responses are plausible transient failures. But a status code is not proof that a state-changing operation was not applied; the endpoint’s contract and replay safety still matter. Authentication, authorization, validation, and unsupported-operation errors usually call for a corrected request or configuration rather than an identical retry.
For gateway responses, RFC 9110 defines 502 as a gateway or proxy receiving an invalid upstream response, 503 as temporary inability to handle the request, and 504 as a gateway not receiving a timely upstream response. These definitions help identify where to investigate, but do not establish whether a downstream operation had a side effect. See RFC 9110 and Microsoft’s transient-fault guidance.
Recommended Free Tools
Rank #3
- Contains one (1) API 5-IN-1 TEST STRIPS Freshwater and Saltwater Aquarium Test Strips 25-Count Box
- Monitors levels of pH, nitrite, nitrate carbonate and general water hardness in freshwater and saltwater aquariums
- Dip test strips into aquarium water and check colors for fast and accurate results
- Helps prevent invisible water problems that can be harmful to fish and cause fish loss
- Use for weekly monitoring and when water or fish problems appear
Honor Retry-After and set a retry budget
When a response includes Retry-After, parse its value and do not retry sooner than requested. RFC 9110 permits either an HTTP date or a non-negative delay in seconds; Retry-After: 120 is an example, not a universal recommended wait. Microsoft advises waiting at least as long as the specified duration.
Without that header, choose a bounded policy suited to the workload and service contract. Microsoft recommends exponential backoff with jitter for background operations; AWS also cautions that frequent retries can degrade the target service. Set a timeout on every outbound call, then define a maximum attempt count or overall deadline. Stop when the failure is permanent, replay is unsafe, or the budget is exhausted. Neither the HTTP standard nor the cited guidance establishes a universal retry count or delay, so base those settings on the operation’s latency tolerance, deadline, SDK behavior, and the service’s documented limits. See Microsoft Learn and AWS Prescriptive Guidance.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




