HTTP 406 Not Acceptable vs 407 Proxy Authentication Required
Both HTTP 406 (Not Acceptable) and 407 (Proxy Authentication Required) belong to the 4xx Client Error category. 406 indicates that the server cannot produce a response matching the Accept headers sent by the client. Meanwhile, 407 means that the client must first authenticate itself with the proxy.
Description
The server cannot produce a response matching the Accept headers sent by the client.
When You See It
When requesting a content type the server doesn't support (e.g., Accept: application/xml when only JSON is available).
How to Fix
Adjust the Accept header to a format the server supports.
Description
The client must first authenticate itself with the proxy.
When You See It
When accessing the internet through a corporate proxy that requires authentication.
How to Fix
Configure proxy credentials in your HTTP client or browser settings.
Key Differences
HTTP 406: The server cannot produce a response matching the Accept headers sent by the client.
HTTP 407: The client must first authenticate itself with the proxy.
You encounter 406 when when requesting a content type the server doesn't support (e.g., Accept: application/xml when only JSON is available).
You encounter 407 when when accessing the internet through a corporate proxy that requires authentication.
When to Use Which
For 406 (Not Acceptable): Adjust the Accept header to a format the server supports. For 407 (Proxy Authentication Required): Configure proxy credentials in your HTTP client or browser settings.