Page MenuHomePhabricator

The server should not fail if given a template with an invalid selection/transformation step
Closed, ResolvedPublic

Description

As described in T305267 and T302425, Web2Cit-Core performs some basic validation of template definitions fetched from Meta.

For example, if an invalid fieldname has been specified, validation fails and the entire template is ignored (see T305267 for a proposal to just ignore the individual misformatted element).

Because validation is not thorough, in some cases misformatted definitions may pass validation, but later fail when later given to the corresponding class constructor.

For example, validation checks that transformation step definitions have a config property of type string. However, it doesn't check if the config value is valid for the specific transformation type, as described in T305267 comments.

As a result, Web2Cit-Core throws an error, which Web2Cit-Server doesn't handle.

Addressing T305267 should fix this.