Usually you do it by giving the same response for an invalid password and a non-existent email. I wanted to see how that particular page was leaking but the site wouldn’t load for me.
Granted, this doesn't apply to eg banks, but there's plenty of websites where this could apply.