Page MenuHomePhabricator

🚨 Modify GetItemStatement
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

Muhammad_Yasser_Jazirahly_WMDE renamed this task from Modify GetItemStatement to 🚨 Modify GetItemStatement.Feb 20 2023, 8:01 AM

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

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

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

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

[mediawiki/extensions/Wikibase@use-exceptions-in-replace-item-statement] REST: Modify GetItemStatement to use exceptions

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

Change 890830 abandoned by Muhammad Jaziraly:

[mediawiki/extensions/Wikibase@use-exceptions-in-replace-item-statement] REST: Modify GetItemStatement to use exceptions

Reason:

Modification for an already-created patch.

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

Change 890342 merged by jenkins-bot:

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

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

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

[mediawiki/extensions/Wikibase@master] REST: Rename newStatementNotFoundError() method

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

Change 891553 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] REST: Rename newStatementNotFoundError() method

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