CLOUD-306 fixed exception handling