Page MenuHomePhabricator

Show more specific and localized error messages for chart rendering errors in the Chart extension
Open, MediumPublic

Description

Acceptance Criteria:

  • User sees more specific validation error details in the extension, rather than generic error messages.
  • Error messages are localized in the user's language.

Notes:

Validation errors in the extension return an error code, in addition to the message.

We can also pass a locale option when rendering the chart in the service. Perhaps this can be of some help with the error messages, as well.

Event Timeline

aude renamed this task from [TASK] Thing to do to Show more specific and localized error messages for chart rendering errors in the Chart extension.Sep 25 2024, 6:19 PM
Reedy updated the task description. (Show Details)
Jdlrobson triaged this task as Medium priority.Oct 11 2024, 10:34 PM

A lot of error conditions in the Charts side _do_ return specific information, but any error in the renderer is flattened into a generic "There was an error rendering the chart" with no details whatsoever.

The chart-renderer needs to be able to export either an English description that we dump raw (eww) or symbolic error codes for specific error cases which can be localized and rendered.

Even if it just throws an exception in a path that wasn't handled, *that* should be sent back and recorded into MediaWiki logs for tracking. :)

Can it also be placed into a hidden maintenance category as well? For example, in https://commons.wikimedia.org/wiki/Category:MediaWiki_software_tracking_categories .

There is a tracking category for failed renderings; if there are any remaining cases where that logic isn't triggering correctly because something is failing where it's not caught, by all means we want to track those down. :)

https://commons.wikimedia.org/wiki/Category:Pages_using_the_Chart_extension_with_rendering_errors

There is a tracking category for failed renderings; if there are any remaining cases where that logic isn't triggering correctly because something is failing where it's not caught, by all means we want to track those down. :)

https://commons.wikimedia.org/wiki/Category:Pages_using_the_Chart_extension_with_rendering_errors

Great! I am not sure why my .js userscripts end up in that category. I have not found any category for faulty tab pages.

Might be something parsing those literal {{Charts:...}}s in the code? Is it... supposed to be doing that? Dunno. :D

I have no idea if this is a new bug because there's no error message that I can get, so forgive me for dumping it here. This chart fails to render when "format": true is specified on an axis: https://commons.wikimedia.org/w/index.php?title=Data:Uclinux_mailinglist_traffic.Line.chart&diff=prev&oldid=1132520301