HH-40000 fix exception handling