Page MenuHomePhabricator

🚨 Modify GetItem to throw use case exceptions
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.

Details

Event Timeline

Change 891323 had a related patch set uploaded (by Muhammad Jaziraly; author: Muhammad Jaziraly):

[mediawiki/extensions/Wikibase@master] REST: Modify GetItem to use exceptions

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

Change 891323 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] REST: Modify GetItem to use exceptions

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