Page MenuHomePhabricator

LexiconEditor should handle internal api error
Closed, ResolvedPublic

Description

If I enter "Wikispeech" into the Transcription field then press Preview this will trigger a internal_api_error_MediaWiki\Wikispeech\SpeechoidConnectorException because the transcription cannot be mapped.

Other than looking in the console there is however no notification to the user that 1) the preview has failed, 2) why the preview failed.

There is some overlap with T276332: Give feedback for transcription preview but the case here is more serious because the sound will never be returned.

Event Timeline

I know I implemented something in the OpenBadges extension which provided user feedback when there was an error. In that case it was triggerd by the submit action but something similar should be possible with the preview action, returning a wfMessage() based on a try/catch around the call to speechoid.

How is this different from

If there is an error from Speechoid, this should be displayed somehow, e.g. in a message dialogue.

in T276332?

Change 841922 had a related patch set uploaded (by Sebastian Berlin (WMSE); author: Sebastian Berlin (WMSE)):

[mediawiki/extensions/Wikispeech@master] Show error dialogue when preview of transcription fails to generate

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

I tried looking into where the error messages originated in Speechoid, but it was to much work just to get it up and running locally. Instead I ended up just showing an error dialogue that also contains the server error message. The various messages will have to be explained to the user, see T320634.

The dialog box contains unrendered characters

Screenshot 2022-12-02 at 10-10-42 Edit lexicon - devwiki.png (290×259 px, 30 KB)

I found the problem. I had a different name for the messages in extension.json.

Change 841922 merged by jenkins-bot:

[mediawiki/extensions/Wikispeech@master] Show error dialogue when preview of transcription fails to generate

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

Change 964892 had a related patch set uploaded (by Sebastian Berlin (WMSE); author: Sebastian Berlin (WMSE)):

[mediawiki/extensions/Wikispeech@REL1_39] Show error dialogue when preview of transcription fails to generate

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

Change 964892 merged by jenkins-bot:

[mediawiki/extensions/Wikispeech@REL1_39] Show error dialogue when preview of transcription fails to generate

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