Start recording response size
Define InvalidFlattenError to signal that flatten=true was requested without group_by
Improve error handling and reporting of response sizes