Adds a try-catch to handle parse errors in client.

Perhaps not. However I did not want to include updates for other tickets in this one. If you think we should take it out I can update the PR.