Termbox seems to be called occasionally with languages that do not exist and are sometimes not even valid. This seems to cause two different errors in our logs:
Error 1:
Asked for data in a language that itself is not existing.
The incidence of this error is rather low with 30 events in the last 7 days and 111 events in the last 6 weeks.
The language code most requested is by far und. Sometimes there are others like qzz, zzz, qqx, tokipona, fractrice, frauteur.
See Kubernetes (i.e. Termbox SSR) logstash. They produce a corresponding error on the MediaWiki side (logstash).
The code that throws this error was created in context of T228888. This error is probably what T231007: Handle unsupported languages more gracefully is about.
Error 2:
Request errors
With the following error object in the logs:
{
"path": "language",
"message": "should match pattern \"^[a-z]{2}[a-z0-9-]*$\"",
"location": "query",
"errorCode": "pattern.openapi.validation"
}The language codes causing this error are 3-digit numbers like 906, 750, 918, 178, 238, 350, 458. There doesn't seem to be any pattern or clusters in those numbers.
But these errors are much rarer with only 7 events in the last 7 days and 35 events in the last 6 weeks.
See Kubernetes (i.e. Termbox SSR) logstash. They produce a corresponding error on the MediaWiki side (logstash) as well.
Note that this is different from T230786: Handle language codes containing numbers.
acceptance criteria
- Termbox SSR is no longer called with an invalid language
