HTTP

HTTP 304 Not Modified vs 422 Unprocessable Content

HTTP 304 (Not Modified) is a 3xx Redirection response, while 422 (Unprocessable Content) is a 4xx Client Error response. 304 indicates that the resource has not been modified since the last request. The client can use its cached copy. In contrast, 422 means that the server understands the content type and syntax, but was unable to process the contained instructions. Common in API validation errors.

Description

The resource has not been modified since the last request. The client can use its cached copy.

When You See It

When the browser cache is still valid (If-None-Match / If-Modified-Since headers match).

How to Fix

No fix needed. This saves bandwidth by confirming the cached version is still current.

Description

The server understands the content type and syntax, but was unable to process the contained instructions. Common in API validation errors.

When You See It

When form validation fails — correct syntax but invalid data (e.g., email format wrong, date in the past).

How to Fix

Check the response body for specific validation errors and correct the input data.

Key Differences

1.

304 is a 3xx Redirection response, while 422 is a 4xx Client Error response.

2.

HTTP 304: The resource has not been modified since the last request. The client can use its cached copy.

3.

HTTP 422: The server understands the content type and syntax, but was unable to process the contained instructions. Common in API validation errors.

4.

You encounter 304 when when the browser cache is still valid (If-None-Match / If-Modified-Since headers match).

5.

You encounter 422 when when form validation fails — correct syntax but invalid data (e.g., email format wrong, date in the past).

When to Use Which

For 304 (Not Modified): No fix needed. This saves bandwidth by confirming the cached version is still current. For 422 (Unprocessable Content): Check the response body for specific validation errors and correct the input data.

Learn More