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

Module tool should give more details about forge errors

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Fix
    • Affects Version/s: PUP 3.7.4
    • Fix Version/s: None
    • Component/s: PMT
    • Labels:
      None
    • Template:
    • Team:
      Platform Core

      Description

      When trying to install a module that isn't a full valid modulename, such as `puppet module install stdlib`, the module tool reports the following error:

      puppet module install stdlib
      Notice: Preparing to install into /Users/matthaus/.puppet/code/modules ...
      Notice: Downloading from https://forgeapi.puppetlabs.com ...
      Error: Request to Puppet Forge failed.
        The server being queried was https://forgeapi.puppetlabs.com/v3/releases?module=stdlib
        The HTTP response we received was '400 Bad Request'
      

      The above error gives no clues as to what the actual problem with the request was, but if you follow the link that the module tool used against forgeapi, you see the following JSON response:

      {
        "errors": [
          "'stdlib' is not a valid full modulename"
        ]
      }
      

      That is a useful error message that tells me what I did wrong. The module tool has access to that information, so it should also print that to the command line to inform the user about these sorts of errors.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              anderson Anderson Mills
              Reporter:
              matthaus Past Haus
              QA Contact:
              Eric Thompson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support