Check the protocol version and fail with a meaningful error message if it doesn't match.