← Integration Engineering
Integration Engineering

A Double Post I Almost Shipped: No Answer Does Not Mean It Failed

7 Oct 2026·3 min read

I have a small tool that posts to LinkedIn for me. A scheduled job wakes it up at 9 in the morning and at 3 in the afternoon. It picks the oldest post that is due and creates it on LinkedIn. If a post failed, the next run tried it again, up to 3 tries in all. That felt responsible.

The question a reviewer asked

What if LinkedIn created the post, and the reply got lost on the way back? My code would see an error, mark the post failed, and post it again on the next run. Same post, twice. It had never happened. That is why nobody had noticed.

The core mistakeMy code treated "I did not get an answer" the same as "it did not work". When the other side goes quiet, the work may already be done.

How I fixed it

  • An error reply like 400 means it surely did not post. A retry is safe.
  • No reply at all, or a 500, means it may have posted. No automatic retry.
  • That post is parked, and I get an email: go and check LinkedIn.
  • A post stuck halfway, because the run crashed, gets the same treatment on the next run.
try {
  res = await createPost()
} catch {
  throw new UncertainPostError()   // no reply: it may have posted
}
if (res.status >= 500) throw new UncertainPostError()  // may have posted
if (!res.ok) throw new Error()   // clear 4xx: safe to retry

// on UncertainPostError: attempts = MAX, status = failed, email "check LinkedIn"
A shortened sketch of the real function, not the full code.
Do this in 60 secondsFind a place in your code that catches a timeout around a create call. If it retries by itself, ask: could the other side have finished the work before the connection dropped?
Today’s AI angleAn agent that gets a timeout from a "create post" tool will usually try again. Have the tool return "uncertain, check before retrying" instead of a plain error.

Retries are good. Blind retries are how you double charge, double email and double post.

A Double Post I Almost Shipped: No Answer Does Not Mean It Failed · Ali Huzaifa