cursor: be more helpful with error output in cursor query stage.