Use error robustness
Use error robustness is one of the principles for designing user-friendly interactive systems (interaction principles) from the DIN EN ISO 9241-110 standard.
Systems should be designed in such a way that user errors do not occur at all, if possible. If errors do occur, the system should react tolerantly to them and, ideally, correct them itself so that users can still reach their goal. The comprehensible and constructive formulation of error messages is also part of this interaction principle.