Logical fallacy
Fallacy of accident
A generally reasonable rule is applied mechanically to an exceptional case where the rule’s purpose or ordinary qualifications make it inapplicable. The argument ignores a relevant distinction.
Also called Sweeping generalization, Dicto simpliciter
Examples
No vehicles are allowed in the park. Therefore an ambulance must stay outside even when someone needs urgent help.
Phones are forbidden in class, so a student must never use one to summon help in an emergency.