Jump to content
  • Sign Up

206 partial content


lynnae.4095

Recommended Posts

I put in some logging around this as the 206 responses are still happening. I assume I'm not the only one seeing this...

When the 206 is returned, the returned item count is less than the requested ids, often just by one, sometimes by two.

The two examples I have from today are:08:32:29 UTC a request to commerce/prices with 128 ids returned a 206 and 126 prices. The missing ids were 84869, 8507519:02:31 UTC a request to commerce/prices with 136 ids returned a 206 and 137 prices. The missing id was 84969

The id list is retrieved by calling commerce/prices.That list is then batched into calls to commerce/prices?ids=

I assume this could be a function of bad luck of calling ids before the api cache updates and then for prices after the api cache updates, but I would suddenly be getting quite unlucky if that's the case. And as I mentioned previously, it's possible to repeat the same request with the same batch of ids 10 seconds after a 206 and receive a 200 back.

Link to comment
Share on other sites

I understand the purpose of the response code, aye.

However if this has always been happening when querying the Prices endpoint with Ids retrieved just prior from the Prices endpoint, I must have been very lucky for over a year then of regularly scraping Trading Post data. I haven't been receiving 206s up until 7 Nov 2017.

Replaying the request will often return the missing data, and the items this happens with seem to be low volume, so it feels as though there may be a mismatch with server side data caching on, perhaps, a single server in the load balancer.

Link to comment
Share on other sites

  • 2 months later...

Ta for the gitblame.

Yes, it is normal for an API to return a 206 for partial data.

I don't find it normal for an API to return 206 and then 200 for the same request made in succession.

The multi_request function there looks like it's purpose is to multi-threaded requests, so most likely it's taking the list of item ids, and making one request for each.

The partial result is then most likely happening because at least one of those multiple requests is not returning or erroring out.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...