@http · HTTP status codes, explained HTTP/1.1 406 Not Acceptable ━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4xx · Client error No representation matches your Accept headers. WHAT IT MEANS ──────────────────────────────────────────────────────────── The server can't produce a response matching the request's Accept, Accept-Language or Accept-Encoding headers. Most servers ignore this and send their default representation instead, which is usually more useful. WHY YOU'RE SEEING IT ───────────────────────────────────────────────────── → A client sending Accept: application/xml to a JSON-only API. → Strict content negotiation in a framework. → Some security modules use 406 to block requests they don't like. HOW TO FIX IT ──────────────────────────────────────────────────────────── → Send an Accept header the server supports, or */*. → On the server, consider falling back to a default format instead of failing. EXAMPLE RESPONSE ───────────────────────────────────────────────────────── HTTP/1.1 406 Not Acceptable Content-Type: application/json  {"error": "supported types: application/json"} related 415 Unsupported Media Type   300 Multiple Choices   400 Bad Request spec RFC 9110 §15.5.7 https://www.rfc-editor.org/rfc/rfc9110#section-15.5.7 web https://athttp.com/406 ← curl athttp.com/405 curl athttp.com/407 →