Page MenuHomePhabricator

🚨 Modify GetItemStatements
Closed, ResolvedPublic

Description

  • Modify the use case to use exceptions instead of response objects
  • Modify validators by:
    • Move the validation logic into the validator, in a new method assertValidRequest
    • Throw a UseCaseException inside the new method
  • Modify related route handler
  • Since there is now only one response for use cases (the SuccessResponse), we will rename it to just Response
  • Modify related tests

Event Timeline

Change 891264 had a related patch set uploaded (by Ollie Shotton; author: Ollie Shotton):

[mediawiki/extensions/Wikibase@master] REST: Modify GetItemStatements to throw exceptions

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

Change 891264 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] REST: Modify GetItemStatements to throw exceptions

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