you were scared & then not able to get out of it

the meaning:

You made a bad decision recently, but realized your mistake just in time. Aren’t you glad that you came to your senses? What were you thinking? Try to be smarter next time!