Improve error reporting

This PR adds additional checks for errors after retrieving features, which previously simply assumed a successful query.