It depends on what has failed and the condition of the pump. Problems with floats, controls, electrical components, piping or other parts of the system may be repairable. If the pump itself is badly worn or damaged, replacement may be the better long-term option.