Page MenuHomePhabricator

Catch FedProps exceptions in getParserOutput and display error page
Closed, ResolvedPublic

Description

The error page should include the:

  • entity ID
  • entity label in the language if it exists

TBA by @Samantha_Alipio_WMDE decision about how the page should look & text

The right place to catch the exception in this case might be in FullEntityParserOutputGenerator::getParserOutput (the exception will likely be the one from T255008)
Again catching the ApiRequestExecutionException from the fed props API client
Adding code such as:

		throw new ErrorPageError( 'some Title', 'foo' );

image.png (324×628 px, 45 KB)

Correctly shows an error page rather than the evil exception.

We would be able to get the label and ID for including using something like:

		if( $entity instanceof FingerprintProvider ) {
			$labelForErrorMessage = $entity->getFingerprint()->getLabel( $this->languageCode );
		}

Simple using an ErrorPageError doesn't appear to make the page follow the standard MediaWiki error page style, and perhaps either:

  • We need to look at some other error pages such as MWException and other things that extend ErrorPageError and see where the style comes from and match that
  • Have another style/look designed by UX or product.

We decided to do this all as 1 task

Event Timeline

Change 604687 had a related patch set uploaded (by Tobias Andersson; owner: Tobias Andersson):
[mediawiki/extensions/Wikibase@master] FP: Handle api error on entity page

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

Change 604687 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] FP: Handle api error on entity page

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