refactor(client): check for invalid params and throw more useful errors

@vladikoff r?

fixes #109