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

HTTP 406 Not Acceptable error message should contain format names

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • None
    • PUP 5.5.21, PUP 6.17.0
    • None
    • Coremunity
    • Platform Core KANBAN
    • Needs Assessment
    • Bug Fix
    • Print the mime types from the Accept header which are not acceptable to puppetserver instead of the format objects.
    • Needs Assessment

    Description

      If the server can't generate a response in a mime type that the agent accepts, the server will emit an HTTP 406 Not Acceptable error, but the message includes the format objects instead of the names, leading to an unintelligible message on the agent:

      Warning: Error 406 on SERVER: Not Acceptable: No supported formats are acceptable (Accept: [#<Puppet::Network::Format:0x7854686e @required_methods=[:render_method, :intern_method], @thename=:json, @confine_collection=#<Puppet::ConfineCollection:0x5c6ddb08 @confines=[], @label="Puppet::Network::Format[json]">, @charset=#<Encoding:UTF-8>, @render_multiple_method="to_multiple_json", @extension="json", @intern_multiple_method="from_multiple_json", @render_method="to_json", @weight=15, @mime="application/json", @intern_method=:from_data_hash, @options=nil>, #<Puppet::Network::Format:0x1393113d @required_methods=[:render_method, :intern_method], @thename=:pson, @confine_collection=#<Puppet::ConfineCollection:0x31d503f1 @confines=[], @label="Puppet::Network::Format[pson]">, @charset=nil, @render_multiple_method="to_multiple_pson", @extension="pson", @intern_multiple_method="from_multiple_pson", @render_method="to_pson", @weight=10, @mime="text/pson", @intern_method=:from_data_hash, @options=nil>])
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            josh Josh Cooper
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support