Overview

What you're asking for can't be provided.

Takeaways

  1. The target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request, and the server is unwilling to supply a default representation.
  2. The server should generate a payload containing a list of available representation characteristics and corresponding resource identifiers from which the user or user agent can choose the one most appropriate.
  3. A user agent may automatically select the most appropriate choice from that list..

Information

The 406 Not Acceptable client error response code indicates that the server cannot produce a response matching the list of acceptable values defined in the request's proactive content negotiation headers, and that the server is unwilling to supply a default representation.

Proactive content negotiation headers include:

In practice, this error is very rarely used. Instead of responding using this error code, which would be cryptic for the end user and difficult to fix, servers ignore the relevant header and serve an actual page to the user. It is assumed that even if the user won't be completely happy, they will prefer this to an error code.

If a server returns such an error status, the body of the message should contain the list of the available representations of the resources, allowing the user to choose among them.

Further Reading

Specification

406 Not Acceptable | The HTTP Working Group

406 Not Acceptable

MDN web docs

Accept header field

MDN web docs

Accept-Encoding header field

MDN web docs

Accept-Language header field

MDN web docs