Page MenuHomePhabricator

Evaluate libraries as alternative to home-grown error serialization
Closed, ResolvedPublic

Description

For T241126: Step 1: Improved generic error screen (impact: high), where the user gets the option to create a Phabricator task with pre-filled text, we need to serialize Error objects we encounter; because they can’t be serialized directly with JSON.stringify(), we currently have some custom code to turn those objects into serializable values (see Gerrit discussion). We want to investigate using a library for this, such as serialize-error.

(We should probably also have tests for this, if we don’t have them already.)

Event Timeline

Change 598786 had a related patch set uploaded (by Tonina Zhelyazkova; owner: Tonina Zhelyazkova):
[mediawiki/extensions/Wikibase@master] bridge: Replace homebrew error serialization with a lib

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

(We should probably also have tests for this, if we don’t have them already.)

I tried adding a snapshot test and ended up with a bunch of /var/www/html/wiki1/ in the snapshot, so that’s probably not a great idea.

Change 598786 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] bridge: Replace homebrew error serialization with a lib

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

Change 599084 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] bridge: transpile serialize-error dependency

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

Change 599084 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] bridge: transpile serialize-error dependency

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