Affects Version/s: HI 3.2.2
Fix Version/s: None
Team:Puppet Developer Experience
QA Risk Assessment:Needs Assessment
The error is caused by:
Steps to reproduce:
1. Install PE 2016.4.3 with a simple hiera_include('classes') inside of node default in site.pp.
2. Configure common.yaml with classes: 
3. Change permissions on common.yaml from 644 to 640.
4. Perform two puppet agent runs.
5. Notice the cryptic error message on the second run.
The helpful error message returned in the first agent run should always be returned.
The helpful error message is only returned once and is buried by subsequent agent reports. The cryptic error message is returned on all subsequent agent runs and makes troubleshooting extremely time consuming and costly.
The filecache class should not store nil when an exception is thrown. Doing so results in the cryptic error message on all subsequent runs.
I suspect the root cause of the bug is here: https://github.com/puppetlabs/hiera/blob/3.2.2/lib/hiera/filecache.rb#L53
There is no handler for when when the passed block throws an exception which results in
being set to nil.
Storing nil causes the cryptic error message on all subsequent runs.