Of the two extremes (eternalism vs nihilism) the latter is more harmful. Reference? A common teaching in Mahayana is that of the two extremes it is better to fall into eternalism rather than nihilism. This advice is given by many Mahayana or Middle Way teachers. I'm looking for Sutra references for this teaching or earliest known exposition of this teaching.

I'm tagging this Mahayana as I know this is a Mahayana teaching, but if anyone could find references in the Pali Canon I would be very happy for you to share it :)

Please don't use the question as a means to argue with the teaching... just looking for references.
I'm not sure what's meant by "eternalism"; but quoting from the Pali canon again, in The Truth of Rebirth: And Why it Matters for Buddhist Practice is a passage which says that "mundane right view" (i.e. belief in rebirth) is better or safer than an annihilationst view:


  So it is with all of our actions. Given that we have to wager one way or another all the time on how to find happiness, the Buddha stated that it's a safer wager to assume that actions bear results that can affect not only this lifetime but also lifetimes after this than it is to assume the opposite.
  
  In MN 60, for instance, he pointed out that anyone who adheres to the annihilationist view espoused by Ajita Kesakambalin would not be expected to avoid unskillful behavior, whereas those who hold to the opposite — mundane right view — would be expected to avoid unskillful behavior. Then he said of the first group:
  
  
    "With regard to this, an observant person considers thus: 'If there is no next world, then — with the breakup of the body, after death — this venerable person has made himself safe. But if there is the next world, then this venerable person — with the breakup of the body, after death — will reappear in a plane of deprivation, a bad destination, a lower realm, hell. Even if we didn't speak of the next world, and there weren't the true statement of those venerable contemplatives &amp; brahmans [who assert the existence of the next world], this venerable person is still criticized in the here-&amp;-now by the observant as a person of bad habits &amp; wrong view: one who holds to a doctrine of non-existence.' If there really is a next world, then this venerable person has made a bad throw twice: in that he is criticized by the observant here-&amp;-now, and in that — with the breakup of the body, after death — he will reappear in a plane of deprivation, a bad destination, a lower realm, hell. Thus this safe-bet teaching, when poorly grasped &amp; poorly adopted by him covers (only) one side, and leaves behind the possibility of the skillful."
    
    — MN 60
  
  
  As for the second group — those who hold to mundane right view and act on it — he said this:
  
  
    "With regard to this, an observant person considers thus: 'If there is the next world, then this venerable person — with the breakup of the body, after death — will reappear in a good destination, a heavenly world. Even if we didn't speak of the next world, and there weren't the true statement of those venerable contemplatives &amp; brahmans, this venerable person is still praised in the here-&amp;-now by the observant as a person of good habits &amp; right view: one who holds to a doctrine of existence.' If there really is a next world, then this venerable person has made a good throw twice, in that he is praised by the observant here-&amp;-now, and in that — with the breakup of the body, after death — he will reappear in a good destination, a heavenly world. Thus this safe-bet teaching, when well grasped &amp; well adopted by him, covers both sides and leaves behind the possibility of the unskillful."
    
    — MN 60
  
  
  These arguments don't prove the efficacy of action or the truth of rebirth, but they do show that it is a safer, more reasonable, and more honorable policy to assume the truth of these teachings than it would be to assume otherwise. The Buddha didn't press these arguments beyond that point. In other words, he left it to his listeners to decide whether they wanted to recognize that action is an investment that, like all investments, incurs risks. And he left it to them to decide how they wanted to calculate the risks and potentials that action might involve now and into the future. He didn't ask that his listeners all commit themselves to an unquestioning belief in the possibility that their actions might lead to rebirth, but he wasn't interested in teaching anyone who rejected that possibility outright. As we've already noted, he saw that heedfulness lay at the root of all skillful qualities. If a listener couldn't be persuaded to develop an appropriate level of heedfulness around the risks of action, any further teaching would be a waste of time.