-
Improvement
-
Resolution: Fixed
-
Minor
-
-
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
Epic Link | New: JENKINS-36588 [ 172614 ] |
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. |
Sprint | New: release candidate [ 171 ] |
Rank | New: Ranked higher |
Sprint | Original: release candidate [ 171 ] | New: pannonian [ 211 ] |
Rank | New: Ranked lower |
Sprint | Original: pannonian [ 211 ] | New: tethys [ 161 ] |
Rank | New: Ranked lower |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Status | Original: In Progress [ 3 ] | New: In Review [ 10005 ] |