How to fix it
- Return a real error status and message to the caller.
- Log the failure with enough context to debug it, without personal data.
- Add a test where the write fails and assert that the response says so.
To make the red go away, the assistant wraps the call in try/catch and returns success anyway. The user sees “Saved”. The data never arrived.
npx @neuralaxis/vibedoctor scan What it looks like
A swallowed error removes the only evidence that something went wrong. Logs stay clean and dashboards stay green.
Returning success after a failure is worse: the client believes it, and so does every retry and analytics event downstream.
} catch (error) {} await Promise.reject(new Error("write failed"));} catch (error) { return { ok: true }; } Example: fixtures/flow-swallowed in the VibeDoctor repository.
What VibeDoctor reports
| Finding | Severity | Evidence | From |
|---|---|---|---|
| Success response after a caught failure A catch block sends HTTP 2xx, ok: true, or success: true. In Python, an except block that returns 200 or success. | high | verified | flow-doctor |
| Swallowed error path An empty catch {} in JavaScript or TypeScript, or an except that only contains pass. | medium | verified | flow-doctor |
Evidence grades say how sure the finding is. What verified, observed and heuristic mean →
How to fix it
What this check can’t see
Run it
npx @neuralaxis/vibedoctor scan
Runs locally on JavaScript, TypeScript and Python repos. Hand the result to Cursor,
Claude Code, Codex or Copilot with agent-plan.
Agent setup →