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

nitpick: `new Error("Parse error")`