In case I'm trying to convert to existing, but not yet supported language variant, like zh-hans Parsoid dies with 500 error:
curl -i -H 'Accept-Language: zh-hans' https://zh.wikipedia.beta.wmflabs.org/api/rest_v1/page/html/首页
Parsoid log:
Cannot read property 'getMachine' of undefined TypeError: Cannot read property 'getMachine' of undefined at Function.baseToVariant (/srv/deployment/parsoid/deploy-cache/revs/cf83c3580d0286c7e8a752b2fb9543bda0fb9aaf/src/lib/language/LanguageConverter.js:417:13) at Function.maybeConvert (/srv/deployment/parsoid/deploy-cache/revs/cf83c3580d0286c7e8a752b2fb9543bda0fb9aaf/src/lib/language/LanguageConverter.js:386:8) at Object.apiUtils.languageConversion (/srv/deployment/parsoid/deploy-cache/revs/cf83c3580d0286c7e8a752b2fb9543bda0fb9aaf/src/lib/api/apiUtils.js:527:21) ...
Instead of dying it probably should just ignore the transformation.