Sounds like you have a faulty pinswitch in the door frame or the wire connected to it is shorting out to the chassis. The switch is manually released and operated by the door opening and closing
Not sure with your model but think that it is located on the right hand side of the door opening.
Sometimes the switch gets corroded and goes s/c (short circuit). Switch should be s/c (in released position)when door open and o/c (open circuit when switch pushed in) when the door is closed
You need to remove the switch from the chassis and test it with an Ohmmeter to prove that it is working correctly.
If the switch is OK then perhaps the wire connected to it is earthed somewhere. The insulation could be rubbed or the wire could be pinched and it is shorting out to the chassis.