Rat got into engine compartment

When I took my 07 Mini to the dealer for a routine oil change and to check why the engine warning came on, they told me that a rat had eaten the wires, causing the warning light to come on. I drove down and looked at it myself. Yuck! Droppings and yes, chewed through wires. It’s going to cost me $800 to repair. What I can do to prevent this from happening next week when i get my car back?

D-Con in a little dish atop the engine has worked for me (after the barn door was left open, so to speak.) A dead rat won’t eat your wiring anymore. Remove before driving.