Stay up to date with AI tools, model releases, and developer workflows that matter.

According to recent reports, weekly. Free. One click to leave.

It has been revealed that 7 Day Free Trial. Cancel Anytime.

Every integration that moves something out of your system has the same weak point, and it is.

not the happy path. It is the second attempt.

Sources indicate that your code posts a document to a provider. The connection drops before the response arrives. You now hold no job id, no confirmation and no idea whether anything left the building. The timeout told you about your network. It told you nothing about theirs. (Related: Building for an Open Future - our latest partnership wi...)

Sources indicate that so you retry, and you either send the thing twice or you never send it at all. Pick one, because.

without help from the API you cannot have both. (Related: IShowSpeed breaks down in tears after finishing GTA 6 i...)

It has been revealed that the first instinct is a client-side guard. Hash the payload, keep a table of what you have already.

sent, check it before each attempt.

That works until the duplicate attempt comes from a different process, a different container, or a.

queue worker that started after a deploy. Your table is local state defending against a distributed.

The second instinct is to ask the provider whether the job exists. That means listing recent jobs.

Industry observers note that and matching on something, usually the recipient and a timestamp window. It is a search, and.

According to recent reports, searches have false positives. Two legitimate sends to the same recipient a minute apart look exactly like one send and one retry.

The third instinct is to make the operation naturally idempotent. That works beautifully for a database upsert and fails completely for anything that leaves your control. A document that has been transmitted cannot be un-transmitted by a second call.

An idempotency key, generated by the caller, attached to the request, and honoured by the.

The contract is simple. The caller invents a unique string per logical operation. Every attempt.

Sources indicate that carries the same string. The first request to arrive does the work and records the result against that key. Every later request carrying that string gets the recorded result back instead of doing the work again.

In a recent development, the vital part is where the state lives. It is on the server, which is the only place that knows.

Industry observers note that whether the job exists. Your retry loop stops needing to be clever. It just needs to reuse the key.

Stripe popularised this pattern and the reason it spread is that the alternative is unbounded.

Without it, every caller writes their own deduplication, badly, and the failure only reveals up under load.

Document and messaging APIs are where it matters most, because the side effect is visible to.

It has been revealed that someone outside your firm. Fax for Agents is a current example of the pattern taken.

In a recent development, seriously. It requires an Idempotency-Key on every mutating call, so a retry hands back the.

same job instead of creating a second one.

According to recent reports, idempotency solves the duplicate. It does not solve the other half, which is that you still do not know what happened.

It has been revealed that most integrations model this as a boolean. Sent, or not sent. That is wrong, and you discover it.

the first time a transmission half completes.

A useful state machine for a send has more room in it. Fax for Agents publishes six states:.

In a recent development, queued, active, partial, failed, unknown and delivered. Two of those are the interesting ones.

unknown means the provider has not said. Not failed, not delivered. The correct response to.

According to recent reports, unknown is to wait. A retry loop that treats unknown as failure needs rewriting, because that is.

how you produce duplicates even with idempotency in place.

partial means some of it arrived. Resending the whole document would deliver the first pages.

According to recent reports, twice, so partial is a state that must never be retransmitted automatically. It needs a person, or a.

policy written in advance by a person.

Sources indicate that and delivered should be the narrowest word in the vocabulary. In that API it is written only when.

the provider's evidence for the attempt supports it, never when the request was merely.

It has been revealed that accepted. The gap between "we accepted your job" and "it arrived" is where most false.

Four questions, answerable from the documentation before you write a line of code.

Does it accept a caller-supplied idempotency string on every mutating call, and for how long.

It has been revealed that how many terminal states does a job have? If the answer is two, the API is hiding something.

Is there a state meaning "we do not know yet", and does the documentation say what you should do when you see it?

Sources indicate that when a webhook arrives, can you verify it came from them? Signed delivery with an event id is.

the difference between a webhook handler and an open endpoint.

None of that is exotic. It is the difference between an integration that degrades and one that.

7 Day Free Trial. Cancel Anytime.

β†’ Read original article