Uploaded image for project: 'Red Hat Advanced Cluster Management'
  1. Red Hat Advanced Cluster Management
  2. ACM-20011

Add hints to Go template error messages

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • GRC
    • Product / Portfolio Work
    • False
    • Hide

      None

      Show
      None
    • False
    • None

      With the implementation of toYAML, I realized we could try to dump a hint into the error message.

      Here are some error messages that could be investigated in this issue:

      • Detect that toYAML has been called (though maybe detection isn't necessary...) and, if a "mapping values not allowed in this context" error occurs, append a suggestion that the toYAML output might need to be piped to autoindent or indent
      • If the returned JSON value has lots of escaping with errors like "unexpected "
        " in operand", chances are there's trailing whitespace breaking the multiline YAML parsing
      • If a message like "bad character ..." occurs, it's likely because they're trying to index a map containing a JSON character, in which case they likely need to use the index function.

              Unassigned Unassigned
              rh-ee-dhaiduce Dale Haiducek
              Derek Ho Derek Ho
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: