Page MenuHomePhabricator

Edit invalid 422 errors to be more generic and consistent for labels, descriptions and statements
Closed, InvalidPublic3 Estimated Story Points

Description

Acceptance criteria:

  • patched-description/label-invalid 422 error in the following endpoints - items/descriptions/ and properties/descriptions (and the same for labels)
  • The error will be of the following form
{
  "code": "patched-[label/description/statement]-invalid-field"
  "message": "Patched value for '{field}' is invalid"
  "context": { "path": <field>, "value": <value>}
}

Older notes:
Similar to what was done for aliases: https://phabricator.wikimedia.org/T337371

and also decide which phrasing we'd like to keep (Statement version has: Invalid input for ... and Aliases was decided to be: Patched value for ....)
https://mattermost.wikimedia.de/swe/pl/5ss4di8pct8juqm9a9fpxgik4o

Event Timeline

Ifrahkhanyaree_WMDE renamed this task from Edit invalid character 422 error to be more generic for labels & descriptions to Edit invalid character 422 error to be more generic and consistent for labels, descriptions and statements.Oct 26 2023, 1:07 PM
Ifrahkhanyaree_WMDE updated the task description. (Show Details)

Leaving to @Ifrahkhanyaree_WMDE to decide on preferred copy for error message. Options

  • Invalid input for '{field}' in the patched statement
  • Patched value for '{field}' is invalid
  • something else?
Ollie.Shotton_WMDE renamed this task from Edit invalid character 422 error to be more generic and consistent for labels, descriptions and statements to Edit invalid 422 errors to be more generic and consistent for labels, descriptions and statements.Apr 17 2024, 9:48 AM

During the daily we realized that it might be a little premature to work on this ticket because based on what decision we make here: https://phabricator.wikimedia.org/T362677, the work on this ticket might be wasted.

Post workshop decision - this will be generalized to another message and hence will have a new ticket