One of the commonest calls is, “My latch key turns a little bit but then stops.”
If it’s a Yale latch lock and it’s on the right-hand side of the door, then a loose snib might just have fallen down when the door was slammed shut. (The snib is the tiny button or lever that holds the bolt open or closed. A dropping snib on an ERA on the other-hand, is only going to lock you out if it’s on the left-hand side of the door. (These handings are as if you’re standing outside.)
Another possiblity for any lock with a snib is that there’s a huge gap between the door and the frame; and you left the lock snibbed yet managed to slam it shut.
One, more disturbing possibility you should bear in mind however, is that if a thief has broken in through a window or throught the back door, (s)he will usually snib the front door’s latch so as to get some warning if you return.
So, enter the premises cautiously. Send the dog in first.
If you’re choosing a latch lock, some can be snibbed open or closed, but some can only be snibbed open (also known as a hold-back).