OhMyBug

logic/correctness

Partial Patch Clears Omitted Fields

#54rare4 sightingsfirst seen August 2026

What goes wrong

An endpoint documented as a partial update (PATCH) rebuilds one nested object from the request body alone, so any field the caller leaves out is written as empty or default instead of keeping its saved value — PATCH behaves like PUT.

Example

A client PATCHes only the phone number; the server rebuilds the whole address object from the body and the saved street becomes null.

Not to be confused with

The field is missing from the request, not sent back empty; not a form that saves an inherited default as an explicit value (Untouched default becomes a permanent override).

Discovered by

Field notes

No published story mentions this species yet. When a hunter publishes one after catching it, it appears here.