Qaynaq LABS · TOOLS

HTTP · 4xx Client Error

416 Range Not Satisfiable

Client requested a file portion outside the server's available range.

When you see this status

  • Client requests a byte range beyond file size with Range header
  • Server cannot satisfy the requested range due to resource constraints
  • File is empty but client requests a non-zero range

Common causes

  • Invalid Range header value (e.g., bytes=1000-2000 for a 500-byte file)
  • File truncated or modified after Range request
  • Server misconfiguration of range handling
  • Client assumes file is larger than actual size

How to debug it

  1. Verify the Range header in the request
  2. Check actual file size on the server
  3. Ensure range requests are supported by the server
  4. Validate client-side assumptions about file size

Return this code in your framework

Express (Node.js)
res.status(416).set('Content-Range', 'bytes */100').send('Range not satisfiable');
FastAPI (Python)
from fastapi import HTTPException
raise HTTPException(status_code=416, detail="Range not satisfiable")
NestJS
@Get()
async getFile(@Res() res: Response) {
  res.status(416).set('Content-Range', 'bytes */100').send();
}
Go (net/http)
w.WriteHeader(http.StatusRequestedRangeNotSatisfiable)
w.Header().Set("Content-Range", "bytes */100")

About HTTP 416

HTTP status code 416 Range Not Satisfiable is part of the 4xx Client Error family. Client requested a file portion outside the server's available range. 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.

Frequently asked

Why does the server return 416 instead of 200 for a full file request?

Servers may return 416 if the Range header is present, even for full files. Clients should handle both 200 and 206 responses for full files.

Can 416 occur with multipart range requests?

No. 416 applies to single range requests. Multipart ranges return 206 with partial content or 416 if any part is unsatisfiable.

How should clients handle 416 responses?

Clients should retry without Range headers or adjust the range to valid values. The server may include 'Content-Range: bytes */<length>' in the response.