Status Code 417

Expectation Failed

The server cannot meet the requirements of the Expect request-header field.

Details

Category

Client Error

Popularity

rare

Recommended

No

Deprecated

No

Common Use Case

Expect: 100-continue not supported

Notes

Used when the server cannot meet the expectations specified by the client.

RFC Reference

RFC 9110 HTTP/1.1 (2022)
Defines the HTTP/1.1 protocol, including semantics, caching, and connection management.

Description

The server cannot meet the requirements of the Expect request-header field.

HTTP Response Example

A typical server response for a 417 Expectation Failed status code looks like:

HTTP/1.1 417 Expectation Failed
Date: Sun, 22 Mar 2026 12:00:00 GMT
Server: httperrors.com
Content-Type: application/json

{
  "error": {
    "code": 417,
    "message": "Expectation Failed"
  }
}
Detailed Explanation

Client errors are not always signs of a broken application. Many of them are deliberate contract signals that help API consumers, browsers, and operators understand what must change before retrying.

Historically, HTTP 417 Expectation Failed should be read in light of RFC 9110. Standards text tends to focus on precise semantics, while production systems care about retries, user experience, dashboards, proxies, browsers, and documentation. Good engineering joins those two views instead of choosing one over the other. When teams treat a status code as both a protocol message and a product decision, they produce APIs and pages that are easier to operate and easier to trust.

A practical reading of this entry is that the server is communicating something very specific: The server cannot meet the requirements of the Expect request-header field. In day-to-day work, that meaning should be reflected across controllers, reverse proxies, API gateways, and frontend assumptions. If the server sends HTTP 417, but the response body, cache headers, or application behavior tell a different story, client code starts compensating for inconsistency and the whole stack becomes harder to reason about.

The example attached to this code, Expect: 100-continue not supported, helps anchor the status in a real workflow. That matters because status codes become easier to remember when they are associated with an operational scenario rather than memorized in isolation.

A useful client error response should do more than fail fast. It should tell the caller enough to correct the request without exposing unnecessary internals or creating security leaks.

In implementation terms, HTTP 417 Expectation Failed should appear at a deliberate decision point in your request handling code. Avoid choosing it late as a cosmetic label after the rest of the response is already formed. Automatic retries are usually the wrong first move unless the client can correct the original request before sending it again. If your logs show this status frequently, the surrounding context should make it obvious whether the response reflects normal traffic or a design problem.

The recommendation flag for this entry is negative, so teams should treat HTTP 417 as a specialized code that deserves extra review before adoption. This is especially relevant when designing a public API that must stay predictable over time.

A useful way to compare HTTP 417 is against other 4xx responses that might look similar in dashboards. Choosing the wrong one can blur important distinctions between validation failures, authorization issues, missing resources, and unsupported operations. This is one reason protocol precision pays off over time: the better your status taxonomy, the easier it becomes to debug client behavior, build metrics, and explain edge cases to other engineers.

From an operational perspective, HTTP 417 should be visible in logs, metrics, and alerts with enough surrounding metadata to explain why it happened. Popularity for this entry is listed as rare, and that should influence how much defensive documentation and monitoring you add. Because the code is relatively rare, every occurrence is a stronger signal that engineers and support teams will need extra context.

Client error responses tell crawlers that the requested content is unavailable, invalid, restricted, or otherwise not ready to be processed. Used accurately, that helps search engines understand site quality. Used carelessly, it can make healthy content look broken or thin. For HTTP 417, the operational takeaway is that status correctness supports SEO indirectly by making crawl behavior more predictable. Pages, APIs, and edge routes should return this code only when its meaning is exactly true.

Since this code is not marked as recommended, it should usually be treated as a specialist tool rather than a default answer. That does not make it wrong. It means the burden of proof is higher: engineers should be able to explain why this code communicates the situation better than a more conventional alternative.

Because this code is not deprecated, it remains part of the active vocabulary that modern web systems can use. Even so, correctness still depends on discipline. A valid status code becomes harmful if teams reuse it as shorthand for several unrelated situations.

Because HTTP 417 sits in the client error category, developers should think about how the code interacts with frontend behavior, backend instrumentation, CDN layers, and search engine crawlers. A status code is never just a number in the network tab; it becomes part of your application's public contract.

The best way to think about HTTP 417 Expectation Failed is not as trivia, but as a promise. It tells the caller what happened, what should happen next, and how much confidence the client can place in the current response. The example recorded for this entry is Expect: 100-continue not supported, and the note says Used when the server cannot meet the expectations specified by the client.. Together with the specification link at https://datatracker.ietf.org/doc/html/rfc9110#section-15.5.18, those details give implementers enough context to use the code intentionally rather than mechanically. That is the standard worth aiming for in production systems.

Other HTTP status codes in the Client Error category

400 Bad Request

The server cannot or will not process the request due to an apparent client error.

Reference: RFC 9110
Example usage:
Malformed request syntax, invalid parameters
Client Error
401 Unauthorized

Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided.

Reference: RFC 9110
Example usage:
Missing or invalid authentication credentials
Client Error
402 Payment Required

Reserved for future use. The original intention was that this code might be used as part of some form of digital cash or micropayment scheme.

Reference: RFC 9110
Example usage:
Digital payment systems (rarely used)
Client Error
403 Forbidden

The request contained valid data and was understood by the server, but the server is refusing action.

Reference: RFC 9110
Example usage:
Insufficient permissions, IP blocking
Client Error
404 Not Found

The requested resource could not be found but may be available in the future.

Reference: RFC 9110
Example usage:
Broken links, deleted resources, typos in URL
Client Error
405 Method Not Allowed

A request method is not supported for the requested resource.

Reference: RFC 9110
Example usage:
Using POST on a GET-only endpoint
Client Error
406 Not Acceptable

The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.

Reference: RFC 9110
Example usage:
Client requests XML but server only has JSON
Client Error
407 Proxy Authentication Required

The client must first authenticate itself with the proxy.

Reference: RFC 9110
Example usage:
Corporate proxy requiring authentication
Client Error
408 Request Timeout

The server timed out waiting for the request.

Reference: RFC 9110
Example usage:
Client took too long to send request
Client Error
409 Conflict

Indicates that the request could not be processed because of conflict in the current state of the resource.

Reference: RFC 9110
Example usage:
Version conflicts, duplicate resource creation
Client Error
410 Gone

Indicates that the resource requested is no longer available and will not be available again.

Reference: RFC 9110
Example usage:
Permanently deleted resources
Client Error
411 Length Required

The request did not specify the length of its content, which is required by the requested resource.

Reference: RFC 9110
Example usage:
Missing Content-Length header
Client Error
412 Precondition Failed

The server does not meet one of the preconditions that the requester put on the request header fields.

Reference: RFC 9110
Example usage:
If-Match header conditions not met
Client Error
413 Content Too Large

The request is larger than the server is willing or able to process.

Reference: RFC 9110
Example usage:
File upload exceeds size limit
Client Error
414 URI Too Long

The URI provided was too long for the server to process.

Reference: RFC 9110
Example usage:
URL with too many query parameters
Client Error
415 Unsupported Media Type

The request entity has a media type which the server or resource does not support.

Reference: RFC 9110
Example usage:
Uploading unsupported file format
Client Error
416 Range Not Satisfiable

The client has asked for a portion of the file, but the server cannot supply that portion.

Reference: RFC 9110
Example usage:
Invalid byte range in Range header
Client Error
418 I'm a teapot

This code was defined in 1998 as one of the traditional IETF April Fools' jokes.

Reference: RFC 2324
Example usage:
April Fools' joke, some services use it humorously
Client Error
421 Misdirected Request

The request was directed at a server that is not able to produce a response.

Reference: RFC 9110
Example usage:
HTTP/2 connection reuse issues
Client Error
422 Unprocessable Content

The request was well-formed but was unable to be followed due to semantic errors.

Reference: RFC 4918
Example usage:
Validation errors in request body
Client Error
423 Locked

The resource that is being accessed is locked.

Reference: RFC 4918
Example usage:
WebDAV locked resources
Client Error
424 Failed Dependency

The request failed because it depended on another request and that request failed.

Reference: RFC 4918
Example usage:
WebDAV dependent operations
Client Error
425 Too Early

Indicates that the server is unwilling to risk processing a request that might be replayed.

Reference: RFC 8470
Example usage:
TLS early data concerns
Client Error
426 Upgrade Required

The client should switch to a different protocol such as TLS/1.3.

Reference: RFC 9110
Example usage:
HTTP to HTTPS upgrade requirement
Client Error
428 Precondition Required

The origin server requires the request to be conditional.

Reference: RFC 6585
Example usage:
Prevent lost update problem
Client Error
429 Too Many Requests

The user has sent too many requests in a given amount of time.

Reference: RFC 6585
Example usage:
Rate limiting, API quotas exceeded
Client Error
431 Request Header Fields Too Large

The server is unwilling to process the request because either an individual header field, or all the header fields collectively, are too large.

Reference: RFC 6585
Example usage:
Cookie header too large
Client Error
451 Unavailable For Legal Reasons

A server operator has received a legal demand to deny access to a resource or to a set of resources.

Reference: RFC 7725
Example usage:
Content blocked due to legal requirements
Client Error

HTTP status code data sourced from official IETF RFCs and standards.

© 2026 The open source reference for HTTP status codes