Leaking Portafilter

I recently purchased a Breville Barista Express BES870, and am very new to this coffee making game. I am finding that the portafilter is spraying out the side of the portafilter sometimes but not always, rather than just falling into the cup. I end up with a coffee machine and wall covered in freshly brewed coffee. What am I doing wrong?

things to check that i can think of:

•make sure you’re locking the portafilter in all of the way

•check the seal/gasket for the portfilter head and make sure it’s not compromised/needing to be replaced

•observe the pressure for the machine and make sure it is properly calibrated/in spec