Could use better validation to ensure stack trace is not surfaced with malformed config. For example with https://github.com/puppetlabs/bolt/blob/1266668806665d9126397073711efb84dd45b44e/lib/bolt/inventory/group2.rb#L105 we assume target['config'] is either a Hash or nil. I accidentally did config: local and got a stack trace.
NoMethodError: undefined method `keys' for "local":String
/home/cas/working_dir/bolt/lib/bolt/inventory/group2.rb:106:in `add_target'
/home/cas/working_dir/bolt/lib/bolt/inventory/group2.rb:59:in `block in initialize'