D2 appears when water heats up to or exceeds the set temperature. The code signals the need to cool down and refire.
If you want water to heat up to, say, 50 degrees, you make a respective adjustment using the temp up/down buttons and let your system do just that. Once the temperature exceeds the chosen level by around 5 degrees, the burner will switch off, and the d2 error code will appear on the display. The code will be there until water cools down to about 45 degrees. Then the code will be gone, the current temperature will be shown, and the burner will kick back in. Simply put, the d2 error code indicates that the burner has stopped heating until the temperature drops back to a level slightly below the set one.