Files
tubestation/browser/components/newtab/content-src
Barret Rennie 935952aa19 Bug 1832827 - Improve Experimenter error messages for FxMS schemas r=aminomancer
Previously, when a `TemplatedMessage` was missing a required field, the error
on Experimenter would be that the message's template field was expected to be
`multi`. This happens because the `oneOf` doesn't match `TemplatedMessage` due
to required fields missing, so it infers it must be a `MultiMessage`.

Now instead of using a `oneOf` to match against either a `MultiMessage` or a
`TemplatedMessage`, we use an `if`/`then`/`else`, predicated by the `template`
key so that if `template != "multi"`, the errors will come form the
`TemplatedMessage` definition.

Differential Revision: https://phabricator.services.mozilla.com/D177914
2023-05-12 15:20:47 +00:00
..