Skip to content

missleading error message for malformed hdm.yml #765

@bastelfreak

Description

@bastelfreak

I recently debugged a HDM 4.1.0 installation. The hdm.yml contained the key puppetdb. Correct is puppet_db. With this typo, we get the following error:

hdm | [3ac84955-d554-4482-902f-ca3b3e9dada6] rescue_from handled Hdm::Error (NoMethodError: undefined method 'with_indifferent_access' for nil) - app/services/puppet_db_client.rb:30:in 'PuppetDbClient::ClassMethods#environments'
hdm | [3ac84955-d554-4482-902f-ca3b3e9dada6] Rendered layout layouts/application.html.erb (Duration: 40.9ms | GC: 0.6ms)

triggered by: https://github.com/betadots/hdm/blob/main/app/services/puppet_db_client.rb#L34-L36

We do not check if a puppet_db key exists, we just assume it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions