• Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • blueocean-plugin
    • tethys

      Ad discussed with cliffmeyers, in creation flow, UI wants to have fine grain control over API returned error message so that it can distinguish different errors with code across fields.

      At present, API returns error message in the format:

      {
           "code": 401,
           "message": "Wrong password",
            "errors":[{
                    "field":"password",
                }]
            }
      

      errors field should include code and message field to have error per field that resulted in validation error. It should look something like:

      {
           "code": 401,
           "message": "Login failed",
            "errors":[{
                    "field":"password",
                    "code": "INVALID",
                   "message":"Wrong password"
                }]
            }
      

      This fix should also formalize field naming patterns so that UI can relate field value with the element in request json object graph.

          [JENKINS-41047] API error message improvement

          Vivek Pandey created issue -
          Vivek Pandey made changes -
          Epic Link New: JENKINS-36588 [ 172614 ]
          Vivek Pandey made changes -
          Description Original: Ad discussed with [~cliffmeyers], in creation flow, UI wants to have fine grain control over API returned error message so that it can distinguish different errors with code across fields.

          At present, API returns error message in the format:

          {code}
          {
               "code": 401,
               "message": "Password must be 8 chars",
                "errors":[{
                        "field":"password",
                    }]
                }
          {code}

          errors field should include code and message field to have error per field that resulted in validation error. This fix should also formalize field naming patterns so that UI can relate field value with the element in request json object graph.
          New: Ad discussed with [~cliffmeyers], in creation flow, UI wants to have fine grain control over API returned error message so that it can distinguish different errors with code across fields.

          At present, API returns error message in the format:

          {code}
          {
               "code": 401,
               "message": "Wrong password",
                "errors":[{
                        "field":"password",
                    }]
                }
          {code}

          errors field should include code and message field to have error per field that resulted in validation error. It should look something like:

          {code}
          {
               "code": 401,
               "message": "Login failed",
                "errors":[{
                        "field":"password",
                        "code": "INVALID",
                       "message":"Wrong password"
                    }]
                }
          {code}

          This fix should also formalize field naming patterns so that UI can relate field value with the element in request json object graph.
          James Dumay made changes -
          Sprint New: release candidate [ 171 ]
          James Dumay made changes -
          Rank New: Ranked higher
          James Dumay made changes -
          Sprint Original: release candidate [ 171 ] New: pannonian [ 211 ]
          James Dumay made changes -
          Rank New: Ranked lower
          James Dumay made changes -
          Sprint Original: pannonian [ 211 ] New: tethys [ 161 ]
          James Dumay made changes -
          Rank New: Ranked lower
          Vivek Pandey made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Vivek Pandey made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]

            vivek Vivek Pandey
            vivek Vivek Pandey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: