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