When you see this status
- Client starts sending request but never completes it
- Network interruption during request transmission
- Slow client unable to send data within server timeout
- Proxy or load balancer drops idle connections
Common causes
- Unstable network connection
- Client-side timeout too short
- Server-side idle timeout too aggressive
- Large request payload with slow upload
- Malformed client implementation
How to debug it
- Check network stability between client and server
- Increase client-side timeout to match server expectations
- Review server idle timeout configuration
- Log request headers to verify partial transmission
- Test with smaller payloads to isolate issue
Return this code in your framework
Express (Node.js)
res.status(408).send('Request Timeout');
FastAPI (Python)
from fastapi import HTTPException
raise HTTPException(status_code=408, detail="Request Timeout")
NestJS
@Get()
getData(@Res() res: Response) {
res.status(408).send('Request Timeout');
}
Go (net/http)
w.WriteHeader(http.StatusRequestTimeout)
w.Write([]byte("Request Timeout"))
About HTTP 408
HTTP status code 408 Request Timeout is part of the
4xx Client Error family. Server did not receive a complete request within expected time. Understanding it is essential for
backend engineers, API designers, and anyone debugging integrations between services.
The Qaynaq Labs HTTP Status Code Explainer covers all standard codes with practical guidance:
what triggers them, how to debug them in production, and exactly how to return them from common
frameworks. Each code page is hand-curated and verified.