Category: Forms and APIs

HTTP 412 Precondition Failed on record update

Read this guide in Polish

The API refuses to write because the client edited an outdated version of the data.

How to identify the source of the problem

Check the heading If-Match and ETag of the current record representation.

Save method, status, headers and anonymized body requests and answers.

Repair steps

Get a fresh version, show the differences and rewrite it consciously after the conflict is resolved.

How to Test Solution

Parallel editions do not overwrite other people's changes without warning.

Security and restrictions

Do not disable authorization or validation of webhook signature for status 200. Wash the tokens in the logs.