417 Expectation Failed

HTTP 417 Expectation Failed is a 4xx client error status. The server cannot meet the Expect header requirement.

417Status code
4xxClient error
NoCacheable by default
RFC 9110 §15.5.18Defined in

Common causes

What to do

Remove the Expect header from the client.

Example response

HTTP/1.1 417 Expectation Failed
Content-Type: application/problem+json

{"status":417,"title":"Expectation Failed"}

Returning 417 in code

Express   res.status(417).json({ … });
Flask     return jsonify(…), 417
PHP       http_response_code(417);
Go        w.WriteHeader(417)
nginx     return 417;

Other 4xx codes

Frequently asked questions

What does HTTP 417 mean?
The server cannot meet the Expect header requirement.
Is 417 an error?
Yes. It is a client error: the request needs to change before retrying.
Does a 417 hurt SEO?
If search engines see it repeatedly on pages that should rank, those pages can be dropped from the index. Fix it quickly.