You need to be careful not to train them that being scared = treats. My partner and I unintentionally trained our Bombur to become scared at the smallest things, because it would mean he got a few extra pellets and several minutes of pure love and attention (or maybe he faked it, who knows). It was really hard for us to train him out of it, because the only way to train out of it is to ignore them while theyre scared or nervous.
When my three are scared, we first tell them in a soft voice that everything is ok and that they are safe. We might repeat this a few times, depending. If the bun(s) are still thumping after about a minute, one of us will sit on the floor and talk with them so they have physical safety, and we will continue letting them know everything is ok. Usually by this time, theyre all better because they can see that nothing bad is going on. But, if they continue to be afraid, we continue telling them theyre safe while petting them very lightly until they calm down.
So, overall, I personally think you did the right thing
I would just be a little cautious in the future if you notice this becoming a pattern. Rabbits are very smart, especially when it comes to getting something like treats or attention 