OhMyBug

logic/correctness

Narrow Catch Skips Promised Fallback

#93rare11 sightingsfirst seen August 2026

What goes wrong

A 'return the input unchanged on bad data' fallback catches only the exception types someone listed from a parser call, so an unlisted exception from the same call escapes the fallback and one bad item aborts the whole batch.

Example

The per-row date parser's fallback catches only the bad-value error; one row raises a wrong-type error and the whole 10,000-row import dies instead of skipping that row.

Not to be confused with

The catch is too narrow for the operation it guards; not a swallowed cancellation (Swallowed Cancellation) and not error details thrown away (Discarded Failure Diagnostics).

Discovered by

Field notes · 4