Page MenuHomePhabricator

🚨 Modify GetItemLabels
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 890010 had a related patch set uploaded (by Muhammad Jaziraly; author: Muhammad Jaziraly):

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

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

• Muhammad_Yasser_Jazirahly_WMDE renamed this task from Modify GetItemLabels to 🚨 Modify GetItemLabels.Feb 20 2023, 8:01 AM
  • 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.

Change 890010 merged by jenkins-bot:

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

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