What a 409 Conflict means
A 409 means the server won't complete your request because it would conflict with the resource's current state. Typical triggers: creating a record that already exists (a duplicate create), editing an item against a stale version (you're working from an old copy someone has since updated), or two writes racing each other to change the same thing. In short, a 409 status code says your request conflicts with the current state of the resource.
Where you see 409 in APIs, and when to return it
Most 409s come from APIs, not web pages. Some cases you will run into:
- Duplicates: creating a user, order, or file that already exists under the same unique key. The fix is to look the record up first, or update it instead of creating it.
- Concurrent edits: Kubernetes returns 409 with "the object has been modified; please apply your changes to the latest version" when another client changed the object first. Read the latest version and apply your change again.
- Wrong state: the GitHub API returns 409 for some calls on an empty repository, for example. The resource exists, but not in a state where the action makes sense.
If you build the API: return 409 when the request is valid on its own but clashes with what is stored now, and say what clashed in the response body. Use 400 for malformed requests, 422 for values that fail validation, and 412 Precondition Failed when the client sent an If-Match header with an outdated ETag.
Why scrapers see 409
Plain read-only scraping rarely triggers a 409 — it almost always appears when you're writing or submitting data: creating something that already exists, posting a form twice, or calling an API that uses optimistic-concurrency checks. (Optimistic concurrency means the server tags each version of a resource with an ETag — a fingerprint of that version — and your request sends it back via If-Match; if the version has moved on, you get a 409.) Highly parallel jobs that fire the same action at once can also race into 409s.
How to fix a 409 error
Make the operation idempotent (safe to repeat without side effects) or check the resource's state before you write. For versioned resources, honor ETag/If-Match and re-fetch the latest version before retrying. De-duplicate submissions and serialize conflicting writes so two workers never act on the same resource at the same time. A 409 is a state/logic problem, not a block — blindly retrying just repeats the same conflict.
