This is a very well known issue with Bosch dishwasher. Having repaired this issue myself over and over, I know this dishwasher and error well. Appliance repair companies have made thousands off just this repair alone.
Bosch dishwasher with the code 2H displayed in the digital read out will more than likely need the main control replaced #266746. The 2H means there is a heating issue, you need a multimeter to diagnose properly but here is a tale tale sign the board is bad.
Remove the dishwashers control panel, do so by removing the screws around the door, Bosch uses torq head screws on most of their appliances.
With the screws removed the control panel will release and fall forward, you will need to UN clip the control board from the plastic housing. On the bottom of the control there are several locking tabs, depressing them with a small screwdriver will release the board from the housing.
With the dishwasher control removed you can now open the plastic housing, the heater relay will be burnt, look for the missing or black solder mark on the board.
I have heard mixed reviews on soldering the control, sometimes it lasts most times it fails right away, I always replace the board its a sure fix.
Note also the thermostat located on the bottom side of the unit could also cause this error code, testing the thermostat with a volt meter should be done before purchasing any parts.