precondition_failed
Docs version v1 (main)Nauthera is pre-1.0, in a design-partner program
The change was based on a version of the resource that is no longer current (412).
Meaning
- Admin API: an update of a user (
PATCH /) whosev1/ admin/ orgs/ {slug}/ users/ {id} If-Matchnames anETagthe user is no longer at. Someone changed the user's username, email, its verification or attributes since the caller read it: another administrator, the user editing their own attributes, or the user following a verification link. A sign-in, a lock, a status change or a password change does not advance theETag. - The check and the write are one conditional statement, so of two updates sent with
the same
ETagexactly one is applied and the other gets this answer. - A proxy in front of the server that rewrites the
ETagbeyond marking it weak, such as Apache'smod_deflateappending-gzip, makes every update look stale. A tag marked weak (W/"7") names the same revision and is accepted.
Impact
Nothing changed. It is the protection working: without it the update would have
silently replaced the other change, and since attributes replaces the whole map, an
attribute a colleague added would have disappeared. An administrator in the dashboard
is asked to reload the user before saving again.
Diagnosis
- Look the request id up on the Troubleshooting page. The refusal is recorded as
user.updatedwith reasonconflictand causeconcurrent_update. - Find the change that landed in between: the user's audit trail on the dashboard
shows a
user.updated(self_servicewhen the user made it) orauth.record after the caller's read.email_ verification. completed - If nothing landed in between, open the browser's network panel on the user's page:
the
GETof the user answers anETagof the revision alone ("7", orW/"7"). Anything added inside the quotes ("7-gzip") was rewritten by a proxy on the way.
Mitigation
- As an administrator: reload the user, check the other change, and make yours again.
- As an admin-API developer: read the user again (
GET), apply your change to what it returns, and send it with the newETag. Retry once; a loop that reapplies a stale edit without looking defeats the check. OmitIf-Matchonly where overwriting whatever is current is what you mean.
Escalation
Escalate when an update is refused although nothing changed the user since it was
read, for example when the ETag of two reads in a row differs. Open an issue with
the request ids, both ETag values and the server version.
Problem code runbooks · Generated from internal/ in nauthera-server.