Page MenuHomePhabricator

[Generalised error] Invalid query parameter
Closed, ResolvedPublic3 Estimated Story Points

Description

Acceptance criteria:

  • Current messages it will replace: Invalid value for _fields or property for GET /items GET /properties and GET /statements endpoints
  • HTTP status code: 400
  • Error code: invalid-query-parameter
  • Error message: Invalid query parameter: '{parameter}'
  • Context: "parameter": "{matching query parameter in the OpenAPI spec}"

Event Timeline

Ifrahkhanyaree_WMDE renamed this task from [Generalised error] Incorrect query parameter to [Generalised error] Invalid query parameter.Wed, Jun 5, 11:05 AM
Ifrahkhanyaree_WMDE updated the task description. (Show Details)
WMDE-leszek set the point value for this task to 3.Thu, Jun 6, 10:35 AM

Task breakdown notes:

  • respond with the new errors for _fields (item), _fields (property)
    • adjust the corresponding deserializing request validators to throw the new kinds of UseCaseErrors
    • adjust the examples in the spec
  • respond with the new error for property (statements list)
    • adjust the examples in the spec
    • this currently reuses the same validator as property ID path parameters but now needs a separate validator since the error is different

Change #1047908 had a related patch set uploaded (by Silvan Heintze; author: Silvan Heintze):

[mediawiki/extensions/Wikibase@master] REST: Generalise 'invalid-query-parameter' error

https://gerrit.wikimedia.org/r/1047908

Change #1047908 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] REST: Generalise 'invalid-query-parameter' error

https://gerrit.wikimedia.org/r/1047908