In a working household, hot water isn't optional, and a tankless that starts throwing codes puts everyone in the house on the same problem at once.
Often the cause is ordinary. National City's water is hard, and scale builds up in the heat exchanger until the unit starts shutting down. Sometimes it's an ignition part or a sensor. Either way, a licensed contractor can usually track down the cause.
Someone comes out, looks for the cause and gives a straight answer on repair or replacement. You get a clear answer, and you make the decision.