Fixes ZEN-15866

handle exceptions