Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-4930

Provide helpful error message when provider does not have instances defined

    Details

    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Improved a developer error on `provider.instances`.

      Description

      When using the RAL to get a list of resources, if the provider does not have the instances method defined you get:

      Error: Could not run: Provider getsetsebool has not defined the 'instances' class method
      

      Regurgitating an implementation detail is incredibly unhelpful except for those few that actually know how types and providers work.

      I'd like to suggest we add a default instances method on providers that gives us a more helpful error message which every provider must then override (which they'll do anyway if they want to provide this feature, if not they get a user friendly error message for free).

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                bradejr Rob Braden
                Reporter:
                daenney Daniele Sluijters
                QA Contact:
                Eric Thompson
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support