418
HTTP 418 I'm a Teapot
4xx Client Error
- Home
- HTTP Status Codes
- 4xx
- 418
4xx Client Error
RFC 2324, Section 2.3.2
What is HTTP 418 I'm a Teapot?
The 418 (I'm a Teapot) status code was defined in RFC 2324 as an April Fools' Day joke. It indicates that the server is a teapot and cannot brew coffee. While not a real status code, some servers and frameworks use it as a playful Easter egg.
Common Use Cases
- April Fools' Easter eggs
- Testing client error handling
- Teapot-powered web servers
Usage Example
While not intended for production use, 418 can be used internally for testing client error handling. Some frameworks and SDKs include it as a fun reference, and it occasionally appears in API documentation as a joke.
// Laravel - returning 418 as an Easter egg
if ($request->is('teapot')) {
return response('I\'m a teapot', 418);
}
// Express.js
res.status(418).send('Short and stout');
Common Mistakes
⚠️
Mistake: Using 418 in production for actual error handling
Fix: 418 is a joke status code and should not be used in production APIs for real error handling. Use appropriate standard status codes instead.