Affects Version/s: None
Sprint:Platform Core KANBAN
Release Notes Summary:Puppet displays a more meaningful error message if a function is called with arguments it doesn't accept. The message now says "The function '<name>' was called with arguments it does not accept. It expects one of:" followed by the list of acceptable function signatures.
QA Risk Assessment:Needs Assessment
Change the message of a function call type mismatch to read:
as that provides the missing pieces to a user enabling them to understand where to look for the problem and what the possibly long output of type mismatches mean.
Describe your issue in as much detail as possible...
when lookup function is given a none capitalized type the error message is large, confusing and misleading, which makes discovering the issue difficult for new users.
$var = lookup('var',boolean,'first',true) #incorrect
#$var = lookup('var',Boolean,'first',true) #correct
the simple lower case 'B' in boolean triggered 4 error messages for one subject, and all of them are misleading!
Error: Optional[ValueType = Type] provided must be one of [X,Y,Z]
or as at the command line
puppet lookup message --type=string
Error: Could not run: The expression <string> is not a valid type specification.