Page MenuHomePhabricator

Consider returning a 404 error if no applicable templates are found for a target webpage
Closed, ResolvedPublic

Description

If a target webpage is given, for which no templates are defined or no applicable templates are found, the fallback template is used (this may change in the future; see T302019).

However, there may be cases where the fallback template does not apply either. Specifically, if Citoid is failing for a target webpage, the fallback template would be marked as non-applicable, because mandatory fields would mark an empty output as invalid (note that Web2Cit-Core is currently throwing an error in these cases, until T305163 has been addressed).

Because the spirit of the fallback template is to use Citoid in cases where Web2Cit doesn't work, I think that it would be OK that the translation server returns an error in cases where no template applies and Citoid fails, given that Citoid would have returned an error as well.

Alternatively, we may also consider changing the fallback template, to use alternative selection steps if Citoid selection is unavailable. See T305168