Perhaps you, like I, have had someone say something like 'I lied' when what they have done instead is to have made a mistake.
This is sloppy language at its best.
In order for a statement to be a lie, the person making it must know or believe that it is untrue.
It is still a lie if the person thinks it is untrue, but it really is true.
Lying is all about intention.
'Oh! What a tangled web we weave
when once we practice to deceive.'