Make errors more easily 'machine parseable'

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Currently errors from pipeline JSON to PMD are returned in a textual way that makes it awkward for tools to consume them and display appropriate contextual errors, for example:

      At /pipeline/stages/1/branches/0/steps: Array has 0 entries, requires minimum of 1

      It would be helpful if these errors were split somehow into a location and message, e.g.:

      { location: '/pipeline/stages/1/branches/0/steps', message: 'Array has 0 entries, requires minimum of 1' }
      

      or even:

      { location: [ 'pipeline', 'stages', 1, 'branches', 0, 'steps' ], code: 'EMPTY_ARRAY_NOT_ALLOWED', message: 'Array has 0 entries, requires minimum of 1' }
      

      Or maybe something different.

      This would make it easier for tools to consume without having to parse a potentially volatile (and localized) text format.

            Assignee:
            Andrew Bayer
            Reporter:
            Keith Zantow
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: