Wrap all api calls in try/catch. Fixes #53