An E2 error code indicates that there is something occurring electrically, within the water heater.
A common solution for this is to first unplug the water heater from its electrical supply. Next, remove the cover by unscrewing the four screws that hold it in place. The indoor mounted EL22i models have a ribbon cable connecting the display to the computer board. Please be careful as to not damage this wire. You will need to disconnect it using the black connector located 6 inches from the display itself.
Once inside the water heater, you will see the computer board located on the left-hand side, at the bottom corner of your heater. Next, remove the two screws on the face of the computer board at the bottom. Next, disconnect and reconnect all of the wires one at a time, which are connected to the computer board to verify that everything is seated properly. You can then screw the computer board back in place, replace the cover, plug up the power supply, and attempt to run the water heater as normal.