- Create an ItemRedirectException (in the UseCases dir)
- Throw ItemRedirectException or UseCaseErrorException in the use case if the item is a redirect or does not exist
- Catch UseCaseErrorException and ItemRedirectException in the route handler and return appropriate response
- Add e2e tests
Description
Description
Details
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
REST: Handle redirect/not-found for descriptions | mediawiki/extensions/Wikibase | master | +131 -12 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Muhammad_Yasser_Jazirahly_WMDE | T327527 Should our use cases throw exceptions instead of returning different response objects? | |||
Open | None | T344228 Functionality for REST API v1 | |||
Resolved | WMDE-leszek | T327881 ๐ Provide data of all item's descriptions | |||
Resolved | Muhammad_Yasser_Jazirahly_WMDE | T328471 ๐ Return appropriate response if the item is a redirect or does not exist |
Event Timeline
Comment Actions
Change 887717 had a related patch set uploaded (by Muhammad Jaziraly; author: Muhammad Jaziraly):
[mediawiki/extensions/Wikibase@master] REST: Add item exceptions for GetItemDescriptions
Comment Actions
Change 887717 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] REST: Handle redirect/not-found for descriptions