Sometimes you don't realize how close you were until later. Here's one of my stories. A lesson about fuel.
The flight I had planned was IFR and close to the limit of the aircraft's duration. I was only a little surprised at uplifting 100 litres less fuel than I had estimated. Still I had experienced some fuel feeding to another tank and I judged that this must be the case.
I took off in rain from a grass field and into cloud at about 1000 feet. At 10,000 feet I was just out of cloud and had picked up some ice but not so much. The aircraft had no anti-ice system but had sufficient excess thrust to get to altitude quickly and the freezing level was well above the MSA so both my 'outs' were available.
Still it was enough to block one of the vents on the tip tanks and this initially inhibited the transfer of fuel from one of them.
Three hours later I decided to descend early to positive temperatures because the red low fuel light was illuminated again. I thought I should make sure that the last of the fuel was transferred.
Anyway, to the destination and a full procedure NDB approach to minima but landed safely.
A week later I learned that one of the fuel tanks had collapsed and I really did have 100 litres less than I thought. I would probably have had enough to get to my alternate but no more than that!
I learned about flying from that.