420 Method Failure or Enhance your calm

The HTTP response status code 420 Method Failure and 420 Enhance your calm is an unofficial client error returned by the server. When sent by the Spring Framework, the code indicates a method has failed. When sent by Twitter, the code indicates the client is being rate limited for making too many requests.

Usage – Twitter

In version 1.0 of the Twitter Search and Trends API, the 420 Enhance your calm error indicated the client was being rate limited for making too many requests. The intention was to ease traffic by restricting clients to a certain number of requests within a specific time. With the release of Standard v1.1 of the Twitter API, this status was deprecated in favor of the official 429 Too Many Requests response.

Usage – Spring Framework

When the 420 Method Failure error is sent by the Spring Framework, a method has failed. This status code has been deprecated by Spring and is no longer used.

Note

Internet folklore attributes "Enhance your calm" to the 1993 film Demolition Man. No primary source connects the Twitter status code to the movie reference and the claim remains unverified.

SEO impact

Search engines like Google will not index a URL with a 420 response status. Previously indexed URLs returning this status code will be removed from search results.

Example

A client makes a rapid series of API requests to the Twitter v1.0 Search API. The server responds with 420 Enhance your calm to signal the client has exceeded the rate limit.

Request

GET /1/search.json?q=news HTTP/1.1
Host: api.example.re

Response

HTTP/1.1 420 Enhance your calm
Content-Type: application/json
Retry-After: 60

{"errors":[{"message":"Enhance your calm","code":420}]}

How to fix

Reduce the request rate by spacing out API calls over a longer interval. Implement exponential backoff between retries: wait 1 second after the first failure, then 2, then 4, and so on. Respect the Retry-After header when present in the response, and pause all requests until the specified time elapses.

Review the API documentation for published rate limits and design request patterns to stay within those thresholds. Queue outgoing requests on the client side rather than firing them all at once.

Both Twitter and the Spring Framework have deprecated this status code. Modern Twitter API versions return 429 Too Many Requests instead. Update client code to handle 429 as the standard rate-limiting response going forward.

Code references

Apache HttpComponents Core

org.apache.hc.core5.http.HttpStatus.SC_METHOD_FAILURE

Takeaway

The 420 Method Failure and 420 Enhance your calm status codes are unofficial client errors generated by the Spring Framework and Twitter Search. Both platforms have deprecated this code.

See also

Last updated: March 4, 2026