I'm not a teacher and have done all of my programming tutorials with undergrad/grad students I'm supervising, but I wonder if modelling that you also get those errors is helpful?
I really like live-coding with students and when I'm the one typing, I am showing them that I make these mistakes as well and then show them my process of dealing with them. Not only decoding error messages, but also telling them when I forget the arguments I need and showing them that I check the function help, and showing them that I write tests and saying out loud, "okay let's check it did what we think it did". Lots of "Hm, I should've got a dataframe with the same number of rows as X but I've ended up with a scalar, that's not right", or "Oops, every value is NA! Let's try again", etc. Also googling my questions and modelling how to select which answers to try and how to check they are what they say they are.
If you could engage them in watching you code, I can imagine it being fun! Like solving a puzzle all together.