Editorial question67.2K views3,314 votes0 answers1,769 following
AI-generatedHow can I safely retry a FeathersJS Mongoose patch with upsert to avoid duplicate writes on transient failures?
When using a FeathersJS service backed by feathers‑mongoose, I want to retry a patch operation that uses the upsert:true option in case of transient network errors. The concern is that a retry after a partial failure could cause a second insert instead of an update, leading to duplicate documents. The adapter can return a writeResult that contains informatio