Forgot to unplug fridge while replacing thermostat, smelled electrical burning
If you would have shorted something badly the breaker should have tripped. I say "should" have as long as you have a quality breaker that is not corroded.

I would definitely monitor the situation though until you trust that everything is OK. There shouldn't be any increased chance of a problem unless something was seriously damaged. As long as you didn't breathe the fumes for long then you are good.

Rest easy but keep an eye on the fridge until you are sure everything is working normally.