Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
-
1
-
Language 2015-12-16
-
Bug Fix
-
When the hiera.yaml file is not correct, lookup error messages are improved. The error message now more concise and includes the name of the key, the location of the broken hiera.yaml file and the location in hiera.yaml where the evaluation failed.
Description
When there is something wrong with the yaml syntax in a hiera.yaml the error message produced by the logic in lookup_adapter.lookup_global is not very helpful. It shows the error message twice, the reference to the faulty file says <unknown>, and the stack trace that is produced is for the location in the lookup_adapter, not where the error occurred.
To trigger the error use a hiera yaml with a hierachy like this:
:hierarchy:
|
- %{boom}
|
(error is that there should be quotes around the entry)
The error can look like this:
Error: Could not run: Error from DataBinding 'hiera' while looking up 'lookup_options': (<unknown>): found character that cannot start any token while scanning for the next token at line 3 column 11 in (<unknown>): found character that cannot start any token while scanning for the next token at line 3 column 11
|
I think this is of importance to fix since it provides no clue to the user where the error may be.
Attachments
Issue Links
- links to