# conflict

The change collides with the current state, a duplicate or a concurrent change (409).

## Meaning

- Admin API: an email or username another account holds, or a reserved bootstrap
  administrator address; an organization slug already taken; an update that lost a
  race with another change; changing settings the main organization keeps fixed or
  deleting the main organization; resending an invitation to a user with a password;
  a password-reset link for a user without a password or one suspended or blocked; a
  test email the organization cannot send.
- Hosted UI: a device code someone already decided on.

## Impact

Nothing changed. Duplicates and races are expected now and then; an admin form shows
the refusal with `detail`.

## Diagnosis

1. Read `detail`; it names the rule.
2. Look the request id up on the Troubleshooting page. The record is on the action
   that was refused (for example `user.created`, `organization.updated`) with reason
   `conflict` and, where it has one, a cause such as `reserved_identifier`,
   `password_not_set` or `main_organization`.

## Mitigation

- As an administrator: reload the resource and apply the change again, or pick a
  different email, username or slug.
- As an admin-API developer: on a concurrent update, read the current version and
  retry once; do not loop.

## Escalation

Escalate when a unique value is refused as taken, or updates keep conflicting with no
other writer. Open an issue with the request id, `detail` and the server version.

---

[Problem code runbooks](https://www.nauthera.io/docs/v1/runbooks/problems) · Generated from [`internal/runbook/problems.yaml`](https://github.com/nauthera/nauthera-server/blob/main/internal/runbook/problems.yaml) in nauthera-server.
