Fix handling of exception from BodyGenerator