API error message improvement

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

XMLWordPrintable

      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.

            Assignee:
            Vivek Pandey
            Reporter:
            Vivek Pandey
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: