420 Method Failure / Enhance Your Calm β
Meaning β
A deprecated or unofficial status code with multiple meanings: originally proposed in a WebDAV context for "Method Failure" (used by Spring Framework), and famously used by the Twitter API to indicate rate limiting with the message "Enhance Your Calm."
When to Use β
Not used in standardized HTTP. "Method Failure" was used in some WebDAV-related responses when a method failed (now largely replaced by standard 4xx codes). Twitter used 420 to signal the client is being rate-limited (which later changed to 429).
Example β
A Spring application might have returned 420 Method Failure for a failed API action, and early versions of Twitterβs Search API returned 420 Enhance Your Calm when the client was making too many requests.
When Not to Use β
Do not use 420 in new APIs. For rate limiting, use 429 Too Many Requests; for method failures or other errors, use appropriate 4xx/5xx codes. 420 is not an officially recognized code.
Source β
Unofficial (Spring WebDAV proposal / Twitter API v1)