client: add error handling for addmember
Merge pull request #1636 from xiangli-cmu/client

client: add error handling for addmember