Page MenuHomePhabricator

Catch the FederatedPropertiesException in SetClaim and throw a regular ApiUsageException so that the UI will display a nice error message.
Closed, ResolvedPublic

Description

The fed props ApiClient seems to already throw an exception in error cases. (it will change in T255008)
This is not yet caught anywhere and thus displayed as an ugly exception
We need to catch this somewhere to transfer it to a nicer ApiUsage Exceptions

We were thinking something like this for now:

	public function execute() {
		try {
			$this->executeInternal();
		}catch FedPropsErrorMessage {

		}
	}

	private function executeInternal(){

And continue to see how these interactions work and continue to clean it up in the future as we add more

Message to use: "Your save failed due to a failed request to the federation source Wiki."

Event Timeline

Addshore renamed this task from Catch the ApiRequestExecutionException in SetClaim and throw a regular ApiUsageException so that the UI will display a nice error message. to Catch the FederatedPropertiesException in SetClaim and throw a regular ApiUsageException so that the UI will display a nice error message..Jun 10 2020, 11:30 AM
Addshore updated the task description. (Show Details)

Change 606064 had a related patch set uploaded (by Hoo man; owner: Hoo man):
[mediawiki/extensions/Wikibase@master] Handle FederatedPropertiesExceptions in SetClaim

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

Change 606064 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] FP: Handle FederatedPropertiesExceptions in SetClaim

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