Middle
The developer receives code 206 instead of 200 during integration. What to do?
sobes.tech AI
Answer from AI
HTTP status code 206 means "Partial Content" — the server returns not the entire resource, but a part of it. This usually occurs when using the Range header in a request, where the client requests only a part of the file.
What to do:
- Check if the client is sending a request with the
Rangeheader. If yes, then 206 is the expected response. - If you did not expect a partial response, ensure that the client does not send
Rangeor disable support for partial requests on the server. - If the integration requires a full response (200), you should either remove the
Rangeheader from the request or handle the 206 response correctly by assembling all parts. - In logs and API documentation, clarify how the server handles range requests and how to properly retrieve the full resource.
Thus, 206 is not an error but a signal of a partial response. The client or server should be adapted to the required scenario.