420 Enhance Your Calm / Method Failure

Two unrelated legacy meanings: rate limiting in the old Twitter API, and a failed method in early Spring versions.

Status

HTTP/1.1 420 Enhance Your Calm / Method Failure

Details

Twitter's version 1 API returned 420 Enhance Your Calm when a client exceeded its rate limit, a reference to the film Demolition Man. Later API versions replaced it with the standard 429.

Separately, older Spring Framework releases used 420 Method Failure as a Spring-specific error. Both meanings are obsolete, and any 420 in current traffic is coming from legacy software.

Common causes

How to fix it

As the client

As the server

Examples

GET /1/statuses/user_timeline.json HTTP/1.1
Host: api.twitter.com

HTTP/1.1 420 Enhance Your Calm
Retry-After: 60

See also