Page MenuHomePhabricator

๐Ÿ“œ Validate request in use case
Closed, ResolvedPublic

Description

  • Use the existing ItemIdValidator but create a dedicated use case validator
  • Create UseCaseErrorException (in the UseCases dir )
  • Throw UseCaseErrorException if item id is invalid
    • We decided it was okay to use the ErrorResponse error code constants in the UseCaseException for now as it doesn't cause an onion violation

Event Timeline

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

[mediawiki/extensions/Wikibase@master] REST: Validate GetItemDescriptions request

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

Change 886112 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] REST: Validate GetItemDescriptions request

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