Silent failures: the catch blocks that hide bugs from you and your users

Updated November 17, 2026

The worst bugs aren't crashes. A crash shows up in your error tracker. A silent failure shows up as a user who clicked "Save", saw nothing happen, and never came back.

The patterns

The empty catch.

try {
  await saveProfile(data);
} catch {}

The catch that only logs. console.error in production goes to a browser console nobody reads.

The fetch with no error path.

const res = await fetch("/api/profile", { method: "POST", body });
const json = await res.json(); // a 500 still "succeeds" here

fetch only rejects on network failure. A 4xx or 5xx resolves normally, so check res.ok.

The form with no pending or error state. The button stays clickable, the user clicks four times, four requests go out, one fails, nobody knows which.

What good looks like

try {
  const res = await fetch("/api/profile", { method: "POST", body });
  if (!res.ok) throw new Error(`Save failed (${res.status})`);
  toast.success("Saved");
} catch (e) {
  toast.error("Couldn't save. Try again.");
  reportError(e);
}

The user hears about it, you hear about it, and the code doesn't pretend it worked.

Find every one

There are usually dozens of these in an AI-built codebase, because "wrap it in try/catch" is how models make an error go away. Periderm flags empty and log-only catch blocks and fetches without an error path:

npm i -g periderm-cli
periderm scan

Run periderm agents once and your coding agent will fix these as part of every task.

more guides