[go: nahoru, domu]

Page MenuHomePhabricator

Parsoid errors not fully propagated to VisualEditor errors
Closed, ResolvedPublic

Description

If HtmlOutputRendererHelper fails in getHtml() due to the parsoid wrapper for the object stash failing, the error shown to the user (upon clicking the "edit" tab) just mentions "Unable to fetch Parsoid HTML" but says nothing about stash failure. It seems like the "reason" key to LocalizedHttpException should have been propagated up to the user. The string itself is not localized though, so showing 'Failed to stash parser output' would be bit awkward for for non-en languages, but it would at least be useful for debugging.

I had a misconfigured stash in my local wiki so I was always getting this message, thinking the VE/parsoid config was at fault and have to spend a fair amount of time figuring out what was going on.

Event Timeline

MSantos added subscribers: daniel, MSantos.

@daniel this seems to be related to MW rest API, is there a tag for that?

@daniel this seems to be related to MW rest API, is there a tag for that?

I added the tag, though it's strily speaking not quite correct... VE doesn ot use the REST API. But then, it uses HtmlOutputParserHelper, which is defiend in the REST code, so I suppose the tag is still fair.

It seems this is the related code: https://codesearch.wmcloud.org/core/?q=rest-html-backend-error

If the "reason" is supposed to be shown to users, then it should be passed as a parameter to the localised error message (the MessageValue), rather than as a separate field that is neither human- nor machine-readable. It should then be propagated to VisualEditor errors as well.

@daniel my main doubt now is if this falls into the bucket "should be maintained by teams that own the endpoint" or if it's a "core" change that should be tagged to MediaWiki-Platform-Team, what's your opinion on that?

Logging code is on all servers now, but I'm not seeing anything in the HtmlOutputRendererHelper channel so far.

@daniel my main doubt now is if this falls into the bucket "should be maintained by teams that own the endpoint" or if it's a "core" change that should be tagged to MediaWiki-Platform-Team, what's your opinion on that?

This ticket here is about how errors are propagated in VE and shown to the user. I think that's up to Editing.

Logging parsoid errors in HtmlOutputRendererHelper (T356157) is up to either Content Transform or MW Interface - that class is glue code between Parsoid and REST.