Catch and log general exceptions from capi library

I was encountering the "MappingException" quite a lot recently. This turned out to be a thrown Exception by json4s, within the CAPI client library. So I've added a general catch-all for these throwables, which are logged.