moved the query collection methods into a utility and am reporting errors via the pyramid error handlers vs. including it in the JSON response