Fix/master/pup 1568 fix error reporting

https://tickets.puppetlabs.com/browse/PUP-1568