Work effectively with AI coding agents. Understand them as language models running in a tool loop with limited context, which is why they guess, game the visible signal and report confidently. Recognise the shortcut and correctness tells in their code across Python, TypeScript/JavaScript, Rust, Java and Go, and know the damage each one does later. Verify changes instead of trusting them, review diffs fast for quality and security, judge when work is truly finished, and choose, design and steer tasks so agents can finish them well.
Errors swallowed by catch-all handlers card 2 of 6

Removing the error, not the failure

builds on: Error handling idioms across languages, Agents optimise the signal they can see
The agent was chasing a proxy signal: no traceback, exit code 0, tests green. A catch-all that discards the error satisfies all three for *every* possible failure, so it is the shortest path to them. Finding the real cause, which is why some orders have no address, means looking at the data, and the diff never does. Later cost: the failure still happens, only invisibly. Steps before it inside the `try` stay done and steps after it are skipped, so state is left half-updated.
Terms on this card
proxy signal
A visible stand-in for the real goal, such as tests green or the error gone. The agent can satisfy it without achieving the goal.
later cost
The concrete damage a shortcut does after merge, such as a hidden bug, corrupted data or a maintenance burden.
catch-all
A handler that catches every kind of error (e.g. `except Exception`, `catch (Exception e)`), not just the one you expect.
traceback
Python's printed report of an uncaught exception: the error type, its message and the chain of calls that led there.
exit code
The number a process returns when it ends. 0 means success, so schedulers and CI treat 0 as "all fine".
Learn this step by step on Bytewise
Lesson goal: Spot `except Exception: pass`, an empty `catch (e) {}`, Java's `catch (Exception e) { e.printStackTrace(); }`, Go's `_ = err` or `if err != nil { return nil }`, and Rust's `.ok()` discarding errors. Explain the later cost: failures become invisible and state is left half-updated. · the whole lesson