What does HTTP 428 mean?
The server requires the request to be conditional. An API can insist on If-Match for updates to prevent the “lost update” problem — clients must prove they saw the latest version before changing it.
4xx Client error: The request has a problem the client can fix: wrong URL, missing credentials, bad data or too many requests.
How to fix 428 Precondition Required
- Send the latest ETag in
If-Match.
428 and SEO
Not relevant for web pages.
Example response
HTTP/1.1 428 Precondition Required
How to return a 428 response
Node.js (Express)
res.status(428).json({ error: 'Precondition Required' });PHP
http_response_code(428);Python (Flask)
return {'error': 'Precondition Required'}, 428Go (net/http)
w.WriteHeader(428)nginx
return 428;
Related status codes
- 412 Precondition Failed — A condition in the request headers (If-Match, If-Unmodified-Since) was not met.
- 409 Conflict — The request conflicts with the current state of the resource.
Check which status code a URL returns with the HTTP header checker.
Pertanyaan yang sering diajukan
What does status code 428 mean?
How do I fix a 428 error?
If-Match.