Add try/catch around places where the client might throw
Add some tests suggested by @phoebesimon