HTTP 308 Permanent Redirect vs 422 Unprocessable Content
HTTP 308 (Permanent Redirect) is a 3xx Redirection response, while 422 (Unprocessable Content) is a 4xx Client Error response. 308 indicates that the resource has been permanently moved. Like 301, but guarantees the HTTP method will NOT be changed. 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 been permanently moved. Like 301, but guarantees the HTTP method will NOT be changed.
When You See It
For permanent URL changes where POST requests must remain POST.
How to Fix
Update all references to the new URL. The HTTP method is preserved.
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
308 is a 3xx Redirection response, while 422 is a 4xx Client Error response.
HTTP 308: The resource has been permanently moved. Like 301, but guarantees the HTTP method will NOT be changed.
HTTP 422: The server understands the content type and syntax, but was unable to process the contained instructions. Common in API validation errors.
You encounter 308 when for permanent URL changes where POST requests must remain POST.
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 308 (Permanent Redirect): Update all references to the new URL. The HTTP method is preserved. For 422 (Unprocessable Content): Check the response body for specific validation errors and correct the input data.