BloggingBIG Logo
Search
  • Blogs
  • How we work
  • Write Guest Post
Get started

HTTP Status Code 412 Precondition Failed

by Kedar Dangal

  • 2 min read
    • HTTP Status
Share this content
HTTP Status Code 412 Precondition Failed image

The HTTP Status Code 412 indicates that the server failed to fulfill one of the client’s request header preconditions.

When the browser checks on the server, one or more of the criteria specified in the request header fields were found to be untrue. This causes status code 412 precondition failed error.

Status code 412 allows the client to set preconditions on the current state of the resource (its current representations and metadata) and therefore prohibit the request method from being used if the target resource is in an unexpected state.

Navigation

  • Status
  • Examples
  • Specifications
  • Browser compatibility
  • 412 Code References
  • FAQs
    • When should I use HTTP 412?
    • What is a 412 status code?
  • Conclusion

Status

412 Precondition Failed

Examples

ETag: "33a64df551425fcc55e4d42a148795d9f25f89d4"
ETag: W/"0815"

Specifications

Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests (HTTP/1.1)
# status.412

Browser compatibility

status code 412 precondition failed
credit: mozilla.org
Full Support

412 Code References

Rails HTTP Status Symbol :precondition_failed

Go HTTP Status Constant http.StatusPreconditionFailed

Symfony HTTP Status Constant Response::HTTP_PRECONDITION_FAILED

Python2 HTTP Status Constant httplib.PRECONDITION_FAILED

Python3+ HTTP Status Constant http.client.PRECONDITION_FAILED

Python3.5+ HTTP Status Constant http.HTTPStatus.PRECONDITION_FAILED

FAQs

When should I use HTTP 412?

When a request is conditional and the condition isn’t satisfied, status code 412 is used.
When any preconditions fail, the response status code 412 (Precondition Failed) is generally used. Some pre-conditions used in headers are:
(If-Match, If-Modified-Since, If-None-Match, If-Range, If-Unmodified-Since)

What is a 412 status code?

The HTTP Status Code 412 indicates that the server failed to fulfill one of the client’s request header preconditions.

Related Post:

HTTP Status Code 300-Multiple Choices

HTTP Status Code 302 Found

HTTP Status Code 204 – No Content

HTTP Status Code 203 – Non-authoritative Information

HTTP Status Code 207 Multi-Status

HTTP Status Code 208 Already Reported

HTTP Status Code 400 Bad Request

HTTP Status Code 401 Unauthorized

HTTP Status Code 403 Forbidden Error

HTTP Status Code 404 Not Found

HTTP Status Code 405 Method Not Allowed

HTTP Status Code 409 Conflict

HTTP Status Code 411 Length Required

Conclusion

I hope this article was able to help you with your doubts and queries related to the HTTP status code 412 Precondition Failed. Still, if there are any queries related to this topic, feel free to ask in the comment section, we would be happy to assist you. Thank you.

‍

Share
Tweet
Share
0 Shares
Kedar Dangal image

Kedar Dangal

Making a difference, Adding the sum.

Be first to comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

More from HTTP Status

HTTP Status Code 499 Client Closed Request image

HTTP Status Code 499 Client Closed Request

Kedar Dangal image

by Kedar Dangal

  • 4 min read
    • HTTP Status
HTTP Status Code 431 Request Header Fields Too Large image

HTTP Status Code 431 Request Header Fields Too Large

Kedar Dangal image

by Kedar Dangal

  • 4 min read
    • HTTP Status
HTTP Status Code 429-Too Many Request image

HTTP Status Code 429-Too Many Request

Saurabh Chalise image

by Saurabh Chalise

  • 4 min read
    • HTTP Status

Quick links

  • Siteground black friday deals
  • Wp engine black friday deals
  • Greengeeks black friday deals
  • Tmd hosting black friday deals
  • Fastcomet black friday deals
  • Hostwinds black friday deals
  • bluehost black friday
  • Namecheap black friday deals
  • Ionos 1 & 1 black friday deals
  • Hostgator black friday deals
  • ipage black friday deals
  • wpx hosting black friday deals
BloggingBIG logo
  • About
  • DISCLAIMER
  • Disclouser for Blogging BIG
  • Terms and Conditions
  • Privacy Policy
  • Sitemap
Developed by Fnclick
Back To Top