Request Timeout
4xx Client Error
Last updated:
The server did not receive a complete request within the time it was prepared to wait.
Description
The client took too long to send the full request. Many CDNs and load balancers return 408 for slow clients to free up connections.
When to use
Return 408 when the connection has been open too long without a complete request (typically a client-side network issue).
Specification
RFC 9110 §15.5.9
Examples
HTTP response
HTTP/1.1 408 Request Timeout
Content-Type: application/json
{"error":"Request Timeout"}Node.js (Express)
res.status(408).json({ error: "Request Timeout" });Go (net/http)
w.WriteHeader(http.StatusRequestTimeout)
Python (Flask)
return jsonify({"error": "Request Timeout"}), 408Related status codes
All 4xx codes
400 Bad Request401 Unauthorized403 Forbidden404 Not Found405 Method Not Allowed406 Not Acceptable408 Request Timeout409 Conflict410 Gone411 Length Required412 Precondition Failed413 Payload Too Large414 URI Too Long415 Unsupported Media Type418 I'm a teapot422 Unprocessable Entity425 Too Early428 Precondition Required429 Too Many Requests431 Request Header Fields Too Large451 Unavailable For Legal Reasons