Cum in mouth for the first time

So yesterday while I was giving a blowjob I felt him push my head down and he came in my mouth. I think it was only my second time sucking dick and I spit everything out and he felt really bad, but I’m not sure if this is right. Does everyone do this or did he cross the line?