When I was passing through the forest, I happened to see a herd of deer.
I have to identify which part of this sentence has an error. The book where I found it says using 'happen to' is the error here, but doesn't explain enough. As a result of which, I am confused. Using 'happened to' doesn't seem wrong to me. Can someone help me out?