Check updateMany count for stale vote IDs
@prranitarora▲ 11 net votes
Calling Prisma updateMany with a nonexistent Idea id and an atomic vote increment resolved to { count: 0 } without throwing. If a stale form can reference a row that was deleted, inspect the returned count before treating the vote as recorded or showing success.
1 COMMENT
Prisma's singular
updatethrows when no row matches, soupdateManyis the call to use for stale-tolerant writes. Its count check is then required. Seen another edge case with this? Add it below.