← All notes

The danger of integrations that fail silently

When two business systems talk to each other — a management app pushing worked hours to accounting software, an ERP syncing master data with a CRM — there’s one operation that runs thousands of times a day and that almost nobody watches: resolving a reference. System A has a code, a name, a tag; it has to find what it maps to in system B. It sounds trivial. It’s the exact spot where integrations break most silently.

Two failures that look like one

Suppose we need to attach every movement to an “accounting dimension” — a cost center, a project, a class. The code looks up the match in the external system. That lookup can go wrong in two profoundly different ways:

  • The value genuinely doesn’t exist. There’s no match: nobody ever created one.
  • The lookup failed for a transient reason. A timeout, a slow response, a token that expired for a moment. The value exists, but right then we didn’t find it.

To naive code, both cases return the same thing: “not found.” And that’s where the damage begins.

The fallback that guesses

The temptation, faced with a “not found,” is to get by with a workaround: if I can’t find the exact match, I’ll use the closest one. If I can’t find the class by its full name, I’ll try the short name. The integration doesn’t stall, the movement goes through, everyone’s happy.

Except that if the “not found” was actually a transient error, we’ve just written wrong data into an accounting system — with the convenient appearance of having worked. And the second trap is even nastier: if that temporary failure gets cached, a single timeout poisons every operation that follows. A one-millisecond error becomes a whole-day error.

Fail-closed: stopping is cheaper than guessing

The lesson, learned in the field, is counterintuitive for anyone optimizing for smoothness: when a critical reference doesn’t resolve with certainty, the integration must stop, not improvise. Blocking the movement and flagging it is annoying; writing the right value in the wrong place is a problem you discover three months later, at year-end close, with no idea where it came from.

Three principles follow:

  • Always distinguish “doesn’t exist” from “couldn’t verify.” They’re different in nature and must be handled differently.
  • Never cache a transient failure. You remember what’s certain, not what went wrong once.
  • On critical data, block rather than degrade. A visible exception costs one intervention; silently corrupted data costs an investigation.

Integrations aren’t judged by how smooth they are when everything works, but by how they behave the instant something goes wrong. A serious integration, in that moment, has the courage to say “I’m stopping” instead of guessing.

Let’s talk