417 Expectation Failed β
Meaning β
The server cannot meet the requirements of the Expect request-header field. This usually relates to the Expect: 100-continue header.
When to Use β
When the clientβs request includes an Expect header that the server cannot or will not fulfill. Often, if a server does not support the Expectation indicated (like "100-continue" or other token).
Example β
A client sends a request with Expect: 100-continue but the server does not support this expectation, it can respond with 417 Expectation Failed, indicating the expectation cannot be met.
When Not to Use β
Do not use if there was no Expect header in the request. If the failure is due to something else (e.g., authentication, etc.), use the appropriate status code instead.
Source β
RFC 9110