In RESTBase we generally follow the convention of throwing HTTPErrors whenever a resource is not found. This has made error handling fairly clean and reliable.
However, the restbase cassandra table storage backend does not return a 404 when a query result returns an empty list (items). This is inconsistent with the general expectations about request behavior in RESTBase, and has contributed to subtly buggy error handling as documented in T102117.
I think we should change the API behavior of the table storage backends to return 404 whenever the result list is empty. This will be converted to an HTTPError in RESTBase, and thus conform to the expectations about general request behavior.