Uploaded image for project: 'Automation Hub'
  1. Automation Hub
  2. AAH-132

POSTing to namespace endpoints directly results in 500 server error.

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.2
    • None
    • None
    • None

    Description

      Although it's possible to create a namespace directly through the UI, it's currently NOT possible to interact with the API directly to create a namespace - doing so results in a 500 server error, even using the same request on the same endpoint.

      Even if we don't want to support interacting with the API to create namespaces (though that hinders automating some workflows) we should return something other than a 500.

      Steps to reproduce:
      1. go to "My Namespaces"
      2. create a new namespace through the usual workflow, with your browser devtools open on the 'network' tab
      3. after hitting "Create", locate the api request that created the API (the POST to '/api/automation-hub/_ui/v1/namespaces/') and select "copy as cURL"
      4. paste the command into your terminal and edit the json to use a different namespace name - otherwise you'd be trying to create a duplicate namespace.
      4. run the curl command and see the resuling 500 error.

      The above steps aren't the only ones to reproduce the error. It's also possible to cause it with a more typical workflow like:

      1. Get a token from the 'api/automation-hub/v3/auth/token' endpoint
      2. Craft the json to create a new namespace (easier to use the UI to create one and then copy the json)
      3. use curl to POST the data directly, without all the extra headers used by the UI version.

      Attachments

        Activity

          People

            hhummel@redhat.com Henderson Hummel (Inactive)
            hhummel@redhat.com Henderson Hummel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: