HTTP

HTTP 415 Unsupported Media Type vs 505 HTTP Version Not Supported

HTTP 415 (Unsupported Media Type) is a 4xx Client Error response, while 505 (HTTP Version Not Supported) is a 5xx Server Error response. 415 indicates that the server refuses to accept the request because the Content-Type is not supported. In contrast, 505 means that the server does not support the HTTP version used in the request.

Description

The server refuses to accept the request because the Content-Type is not supported.

When You See It

When sending JSON to an endpoint that only accepts XML, or missing the Content-Type header.

How to Fix

Set the correct Content-Type header matching the data format you're sending.

Description

The server does not support the HTTP version used in the request.

When You See It

When a client uses an HTTP version the server doesn't support.

How to Fix

Use a supported HTTP version (typically HTTP/1.1 or HTTP/2).

Key Differences

1.

415 is a 4xx Client Error response, while 505 is a 5xx Server Error response.

2.

HTTP 415: The server refuses to accept the request because the Content-Type is not supported.

3.

HTTP 505: The server does not support the HTTP version used in the request.

4.

You encounter 415 when when sending JSON to an endpoint that only accepts XML, or missing the Content-Type header.

5.

You encounter 505 when when a client uses an HTTP version the server doesn't support.

When to Use Which

For 415 (Unsupported Media Type): Set the correct Content-Type header matching the data format you're sending. For 505 (HTTP Version Not Supported): Use a supported HTTP version (typically HTTP/1.1 or HTTP/2).

Learn More