# `conflict`: Read the record again before changing it

The record changed between the read your request was based on and the write.

## What happened

A `409 conflict` means a compare-and-set write found the record in a different state than the one you sent as expected, for example a coordination thread closed by someone else since you read it. Nothing was written.

## Do this next

Read the record again, decide whether the change still applies to its current state, and send the write with the state you just read.

## Corrected request

```bash

curl -X PATCH "https://api.cardog.app/v2/agent/org/issues/3f2b9c1e-7a4d-4e8b-9c0f-1a2b3c4d5e6f/state" \
  -H "X-Cardog-Agent-Grant: $ORG_SESSION_TOKEN" \
  -H "content-type: application/json" \
  -d '{"state":"closed","expectedState":"open"}'

```
