Hi @xavierap ,
What is the model number of the coffee machine?
I don’t know the answer but looking at the Moltio Super HD8767/47 parts list there is a door reed sensor listed.
Presumably it is operated by a magnet when the door is closed. Check if there is one and if it is connected securely and working. Try using a magnet near it to see if you can make the error message disappear when the door is open.
Note: Due to the way the URL is shown I cannot link the exact page in this answer in the 1st link above. Type HD8767/47 in the Enter a model# part# or description find? search box to get the parts list. Then type Sensor in the Filter by description search box on the parts list page to view all the sensors in the machine. It gives the location of the sensor but unfortunately I cannot find a parts diagram.
If you have a different model just type the full model number in the search box in the 1st link above to hopefully find the parts list for your exact model.
Hopefully this is of some help.