Handle datastore error on queries.