I hate to say it depends, but it does. If you start a synchronous transaction on the primary, and it can't be committed to the mirror, it doesn't get committed to the primary. It has to commit on the mirror before it's hardened on the secondary. It goes through rollback, depending on when the failover occurs.
Does the client get an error? They should certainly get an error that their connection is broken to the primary because they have an open session and never got an acknowledgement of commit.