- 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.
Description
Description
Details
Details
Related Changes in Gerrit:
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| REST: Modify GetItem to use exceptions | mediawiki/extensions/Wikibase | master | +113 -177 |
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | • Muhammad_Yasser_Jazirahly_WMDE | T327527 Should our use cases throw exceptions instead of returning different response objects? | |||
| Resolved | WMDE-leszek | T329947 🚨 Use exceptions instead of response objects in previous use cases | |||
| Resolved | • Muhammad_Yasser_Jazirahly_WMDE | T330167 🚨 Modify GetItem to throw use case exceptions |
Event Timeline
Comment Actions
Change 891323 had a related patch set uploaded (by Muhammad Jaziraly; author: Muhammad Jaziraly):
[mediawiki/extensions/Wikibase@master] REST: Modify GetItem to use exceptions
Comment Actions
Change 891323 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] REST: Modify GetItem to use exceptions