Integrations

Retry-After is not always a number of seconds: interpret the retry time correctly

An external system tells an integration to wait, yet its client immediately repeats the request. The log shows that the developer tried converting Retry-After to a number when it contained a date. Before increasing attempts,…

2 min readLast updated November 4, 2026
A developer and colleague reviewing a connection between business systems

An external system tells an integration to wait, yet its client immediately repeats the request. The log shows that the developer tried converting Retry-After to a number when it contained a date. Before increasing attempts, inspect how the sending client interpreted the waiting instruction.

Distinguish a duration from a point in time

MDN's Retry-After reference describes two forms: an HTTP date or a non-negative integer representing seconds to wait after receiving the response. Converting every value to a number does not establish a valid duration.

In a hypothetical case, the receiver returns a formatted date while the adapter expects seconds only. Substituting zero after conversion fails could create an immediate request contrary to that instruction. Inspect the original value and interpreted result without publishing sensitive request data in a public log.

Separate header interpretation from retry policy

Knowing a proposed time does not authorise unlimited attempts. The client must still respect attempt limits, receiver policy and the meaning of the repeated operation. Why webhook retries stop addresses eligibility and ceilings, a different question from interpreting this header's syntax.

Do not assume that an external response containing the header makes every Taloo path schedule retries from it automatically. Verify the calling client's contract and actual behaviour in an isolated test. Define policy for absent or invalid values rather than turning every parsing failure into zero waiting time.

Test the time actually used

Prepare cases for valid seconds, a valid future date and an uninterpretable value. When using a date, review the system clock, the timezone used to interpret it and your policy for a time already past. Do not resolve this with arbitrary conversion between seconds and milliseconds; that is a separate timestamp-unit problem.

Have the test expose response receipt time, calculated delay and planned next attempt, rather than merely confirming that parsing threw no error. Do not run real request batches to test waiting. Seek an explainable timing decision while reviewing the operation's effect and duplicate prevention. Fixing header interpretation should not repeat a business action that was never safe to repeat in the first place.