OhMyBug

input/serialization

Missing Field Silently Takes Default

#57rare28 sightingsfirst seen September 2026

What goes wrong

A field missing from the incoming data — an older producer's payload, a query that omits the column, a function parameter with a default — is filled in with the type's default (false, 0, empty) and then treated as if the sender had set it, so the consumer stores or shows a value the producer never supplied.

Example

During a rolling deploy old workers send events without the new notify field; the consumer decodes it as false and records that the user opted out.

Not to be confused with

The payload arrived but predates or omits the field; not a failed read that defaults open (Unreadable policy opens the gate), not a missing measurement shown as zero (Unknown measurement becomes certainty), and not a null element inside a delivered list (Container passes with null elements).

Discovered by

Field notes · 5