The Bug:
Failed /effect commands report zero targets when used on non-living entities.
Failed /effect commands name the target when it is a mob, for example "Pig doesn't have the requested effect(s)". However, when the target is a non-living entity, such as a minecart, the message says "0 targets" instead, therefore introducing an inconsistency.
Steps to Reproduce:
Place down a rail and a minecart on top of it.
Give the minecart the speed effect by using the command provided below.
/effect give @n[type=minecraft:minecart] minecraft:speedObserve if the error message says "0 targets".
Observed Behavior:
Failed /effect commands report zero targets when used on non-living entities.
Expected Behavior:
Failed /effect commands would not report zero targets when used on non-living entities.