4xx Client Error
HTTP 406 Not Acceptable
The server cannot produce a response matching the Accept headers sent by the client. The requested content negotiation failed because none of the available representations match the client's criteria.
Common Causes
- Accept header requests a format the server doesn't support
- Accept-Language specifies an unavailable language
- Content negotiation failed between client and server
How to Fix
- 1Adjust the Accept header to match server capabilities
- 2Remove restrictive Accept headers to allow any format
- 3Check API docs for supported response formats
Example
HTTP 406 Not Acceptable
GET /api/data HTTP/1.1 Accept: application/xml → 406 Not Acceptable → Server only supports application/json
Related Client Error Codes
400
Bad Request
401Unauthorized
402Payment Required
403Forbidden
404Not Found
405Method Not Allowed
407Proxy Authentication Required
408Request Timeout
409Conflict
410Gone
411Length Required
412Precondition Failed
413Content Too Large
414URI Too Long
415Unsupported Media Type
416Range Not Satisfiable
417Expectation Failed
418I'm a Teapot
421Misdirected Request
422Unprocessable Content
423Locked
424Failed Dependency
425Too Early
426Upgrade Required
428Precondition Required
429Too Many Requests
431Request Header Fields Too Large
451Unavailable For Legal Reasons