rob05c commented on issue #4007: Server Capability get by name - returns blank 
response array when the requested item doesn't exist
URL: https://github.com/apache/trafficcontrol/issues/4007#issuecomment-545077220
 
 
   I don't think this is a bug, it's a fundamental change to the API.
   
   For a 404 vs an empty array for objects that don't exist, I don't think 
either is the "right" solution. A 404 is probably more expected. But to say 
"the API returns an array of objects, and if your filter didn't have any, you 
get a successful empty array" is not a violation of HTTP.
   
   Moreover, the TO API has returned 200 [] for ages. It isn't documented 
behavior, but it's most certainly a specific behavior, that clients almost 
certainly rely on in places. Even if it doesn't violate the SemVer API Promise, 
we can't reasonably change this without breaking tons of people.
   
   Likewise, IMO we should continue to make new endpoints follow the same 
pattern as everything else.
   
   It wouldn't be a bad idea to do this in the next major version of the API 
(2.0), but we simply can't safely do it to 1.x.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to