HTTP

HTTP 300 Multiple Choices vs 429 Too Many Requests

HTTP 300 (Multiple Choices) is a 3xx Redirection response, while 429 (Too Many Requests) is a 4xx Client Error response. 300 indicates that the request has more than one possible response. The client should choose one of them. In contrast, 429 means that the user has sent too many requests in a given time (rate limiting). The response should include a Retry-After header.

Description

The request has more than one possible response. The client should choose one of them.

When You See It

When a resource is available in multiple formats (e.g., different languages or media types).

How to Fix

Select the appropriate resource variant. Send an Accept header with your preferred content type.

Description

The user has sent too many requests in a given time (rate limiting). The response should include a Retry-After header.

When You See It

When hitting API rate limits or making too many requests too quickly.

How to Fix

Check the Retry-After header. Implement exponential backoff. Consider caching responses.

Key Differences

1.

300 is a 3xx Redirection response, while 429 is a 4xx Client Error response.

2.

HTTP 300: The request has more than one possible response. The client should choose one of them.

3.

HTTP 429: The user has sent too many requests in a given time (rate limiting). The response should include a Retry-After header.

4.

You encounter 300 when when a resource is available in multiple formats (e.g., different languages or media types).

5.

You encounter 429 when when hitting API rate limits or making too many requests too quickly.

When to Use Which

For 300 (Multiple Choices): Select the appropriate resource variant. Send an Accept header with your preferred content type. For 429 (Too Many Requests): Check the Retry-After header. Implement exponential backoff. Consider caching responses.

Learn More