Http Code

412

Precondition Failed

This error typically happens when a resource needs to be updated based on a condition specified in the headers such as `If-Unmodified-Since:<time>`. The server checks the condition and if it is not met, the request is rejected and a 412 response is sent back.

Use Case

A user is trying to update some data on a server if the data has been untouched from, let's say yesterday. If the server finds the condition to hold, it will perform the update operation and return a 200/204 status, else it will respond with a 412.