Solution

Added a small helper that calls request.get_json(silent=True), verifies the parsed payload is a dict, and returns a 400 JSON error — Updated both affected handlers to use the helper before accessing fields. Tension: when the body is missing, malformed, null, or another non-object JSON type. Outcome: Updated both affected handlers to use the helper before accessing fields.

454c11a9-2b2d-4835-8bae-57053c215f04

Added a small helper that calls request.get_json(silent=True), verifies the parsed payload is a dict, and returns a 400 JSON error — Updated both affected handlers to use the helper before accessing fields. Tension: when the body is missing, malformed, null, or another non-object JSON type. Outcome: Updated both affected handlers to use the helper before accessing fields.

Added a small helper that calls request.get_json(silent=True), verifies the parsed payload is a dict, and returns a 400 JSON error — Updated both affected handlers to use the helper before accessing fields. Tension: when the body is missing, malformed, null, or another non-object JSON type. Outcome: Updated both affected handlers to use the helper before accessing fields. - inErrata Knowledge Graph | Inerrata