It seems I cannot create instances of errors.
(Which kinda makes sense, since error types are not types).
There are a few possible approaches to that:
a) bespoke implementation to make this happen
b) create a function that takes an error type and returns a type, which then is used
On first thought, I prefer b over a.
- Introduce Z820/Trigger Metadata (and Z921) in the shared definitions.
- Provide it as a built-in and wire it up in the orchestrator. https://gerrit.wikimedia.org/r/c/mediawiki/services/function-orchestrator/+/757096
- Document it on meta. https://meta.wikimedia.org/w/index.php?title=Abstract_Wikipedia/Reserved_ZIDs&diff=22685169&oldid=22348873&diffmode=source