A request to /v2/translate/{from}/{to}/{provider} that results in an error returns a non-JSON string, but the documentation says that it should return JSON conforming to the problem schema. It'd be more useful if it returned the latter.
For example, a valid request looks like this:
$ curl 'https://cxserver.wikimedia.org/v2/translate/es/en/MinT' -i -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' --data-raw $'{"html":"<span>Hola Mundo</span>"}' HTTP/2 200 content-type: application/json; charset=utf-8 content-length: 15 {"contents":""}
(I've removed irrelevant headers from the response, and the fact that there's no translation doesn't seem to matter; this issue is the same with /v2/translate/ and /v1/mt/, and the latter does return a translation.)
A request to translate to German instead (which is not a supported language), results in a 404, non-JSON, response with just the text "Provider not supported", e.g.:
$ curl 'https://cxserver.wikimedia.org/v2/translate/en/de/MinT' -i -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' --data-raw $'{"html":"<span>Hola Mundo</span>"}' HTTP/2 404 content-length: 22 Provider not supported
This should instead be returning something like:
{
"status": 404,
"type": "…",
"title": "Provider not supported",
"detail": "The target language 'de' is not supported.",
"method": "POST",
"uri": "…"
}