The oven has electrical power. The upper oven door has wire harness connections. If the wire harness is damaged, you should replace it. The upper oven doorlatch assembly needs to be replaced if the wire harness connections are okay. The control board for the oven should be replaced if the problem continues.
Let's Get It Fixed!
HomeX virtual experts will assess your issue (for free!) and can resolve simple problems.