Page MenuHomePhabricator

๐Ÿ“œ Return appropriate response if the item is a redirect or does not exist
Closed, ResolvedPublic

Description

  • 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

Event Timeline

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

[mediawiki/extensions/Wikibase@master] REST: Add item exceptions for GetItemDescriptions

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

Change 887717 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] REST: Handle redirect/not-found for descriptions

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