HTTP 418 I'm a Teapot was defined in RFC 2324 (Hyper Text Coffee Pot Control Protocol) as an April Fools' joke in 1998. When a coffee-making request is sent to a teapot, it returns 418 because it's permanently a teapot. Despite being a joke, it's become a beloved part of internet culture. Google hides an Easter egg at google.com/teapot. While not a real production status code, 418 is occasionally used as a fun response for blocked requests or as a placeholder.
Response includes the status code, standard headers (including Content-Type), and a small diagnostic JSON body describing the request and returned status.
Simulator URL (copy in the app after load — not a normal link):
https://httpstatus.com/api/status/418
Example request:
curl -i "https://httpstatus.com/api/status/418"I'm a teapot (April Fools' joke from RFC 2324, HTCPCP). Any attempt to brew coffee with a teapot should result in this error. Not for serious use.
On this code, Inspector focuses on semantics, headers, and correctness warnings that commonly affect clients and caches.
HTTP 418 I'm a teapot has specific technical implications for API design, caching, and client behavior. Understanding the precise semantics helps distinguish it from similar status codes and implement correct error handling. The response should include a descriptive body following a consistent error schema (like RFC 7807 Problem Details) so clients can programmatically handle the error.
// Handle 418 I'm a teapot in Express
app.use((err, req, res, next) => {
if (err.status === 418) {
return res.status(418).json({
type: 'https://api.example.com/errors/i'm-a-teapot',
title: 'I'm a teapot',
status: 418,
detail: err.message
});
}
next(err);
});from fastapi import HTTPException
# Raise 418 I'm a teapot
raise HTTPException(
status_code=418,
detail={
'type': 'i'm_a_teapot',
'message': 'Descriptive error for 418 I'm a teapot'
}
)// Spring Boot 418 I'm a teapot handling
@ExceptionHandler(CustomI'mateapotException.class)
public ResponseEntity<ErrorResponse> handleI'mateapot(
CustomI'mateapotException ex) {
return ResponseEntity.status(418)
.body(new ErrorResponse("I'm a teapot", ex.getMessage()));
}// Return 418 I'm a teapot
func errorHandler(w http.ResponseWriter, message string) {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(418)
json.NewEncoder(w).Encode(map[string]any{
"status": 418,
"error": "I'm a teapot",
"message": message,
})
}