check for puppet errors before callback

Signed-off-by: Yaniv Bronhaim <ybronhei@redhat.com>