Help! GE has range has locked door but the door is open

My gas range says locked door but the door is open. If you shut it, something rattles. I’ve tried unplugging it, pushing the button on the side, pushing clear, pushing clean. The light has occasionally flicked off and the rattling stopped but both come right back. Any help would be appreciated.