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

Errors from indirected routes don't match error schema

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 4.0.0
    • Fix Version/s: PUP 4.6.0
    • Component/s: None
    • Template:
    • Sub-team:
    • Story Points:
      1
    • Sprint:
      Server Jade 2016-04-20, Server Jade 2016-05-04, Server Jade 2016-05-18, Server Jade 2016-06-15
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      In Puppet 4.0 many errors returned by our API were moved to follow best practices wrt HTTP error codes and a JSON format that follows our documented JSON schema. However one major subsystem of Puppet (the indirector) was not converted to follow this pattern. As of this release API endpoints that hit this subsystem will return proper HTTP error codes and message bodies that conform to our documented JSON standard. The previous behavior was to return a 400 Server Error for all issues with this subsystem.
      Show
      In Puppet 4.0 many errors returned by our API were moved to follow best practices wrt HTTP error codes and a JSON format that follows our documented JSON schema. However one major subsystem of Puppet (the indirector) was not converted to follow this pattern. As of this release API endpoints that hit this subsystem will return proper HTTP error codes and message bodies that conform to our documented JSON standard. The previous behavior was to return a 400 Server Error for all issues with this subsystem.

      Description

      For v2.0, an error schema (https://github.com/puppetlabs/puppet/blob/master/api/schemas/error.json) was added, specifying that errors should be returned as json, with "message" and "issue_kind" specified.

      The indirected routes don't follow this specification, they just return plain text (https://github.com/puppetlabs/puppet/blob/master/lib/puppet/network/http/api/v3/indirected_routes.rb#L47-L50 and https://github.com/puppetlabs/puppet/blob/master/lib/puppet/network/http/api/v3/indirected_routes.rb#L101-L117).

      It would be good, especially since we are migrating to v3 for Puppet 4, for all routes to follow the error schema and return json.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  erik Erik Dasher
                  Reporter:
                  ruth Ruth Linehan
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: