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

I used a more verbose error message to be consistent with other errors in the library. Shouldn't we be consistent?