KRACOEUS-7996 fixing NPEs on error handling