HTTP 428 Precondition Required Error: Meaning & Fix

The HTTP 428 Precondition Required error means a required precondition header, like If-Match, is missing. In web scraping, include such headers to meet server requirements and ensure data consistency.

What causes the error?

  • Missing If-Match or If-Unmodified-Since header in the request.

  • Incorrect or outdated ETag in If-Match header.

  • Failure to include a required version identifier in the request headers.

  • Request headers lacking timestamp or sequence information required for conditional requests.

# Request example 
curl -X PUT https://sandbox.oxylabs.io/ -H 'Accept: text/html' -H 'Accept-Encoding: compress' -H 'User-Agent: Chrome/91.0.4472.124'

Try Scraper API with 5K results

Common error fixes

  • Verify the status of the resource and ensure it is not locked by another process or user.

  • Check the server's configuration settings to ensure that access permissions and resource locks are correctly set.

  • Contact the administrator to unlock the resource if you do not have the necessary permissions.

  • Review and resolve any conflicts or dependencies that might be causing the resource to be locked.

# Response example 
HTTP/1.1 428 Precondition Required
Content-Type: text/html
Content-Length: 49

428 Precondition Required

Leave errors behind with our API

Web Scraper API

Self-Service

Public data delivery from a majority of websites

From

49

Useful resources

Get the latest news from data gathering world

I'm interested