API Testing error Error: Request failed with status code 409 (Conflict)
The API refused to create/update a resource because it already exists in that state, a common symptom of tests sharing data instead of isolating it.
Why this happens
- Two tests (or two parallel runs) tried to create a resource with the same unique key (email, slug, SKU)
- A previous test run failed to clean up, leaving behind a resource that collides with this run
How to fix it
- Generate unique identifiers per test run (timestamp/UUID suffix) instead of hardcoded fixture values
- Add teardown that deletes what the test created, even on failure, so a crashed run doesn't poison the next one
- Avoid running tests that mutate shared unique resources in parallel against the same environment