differentiate between expected and unexpected handshake error