REST handlers currently often use unlocalized error messages when return error responses in the 4xx range. They should use localized errors instead. This means constructing a LocalizedHttpException instead of a plain HttpException, and adding new translation keys to en.json and qqq.json in the i18n directory.
This search provides a quick survey of code that throws a plain HttpException: https://codesearch.wmcloud.org/search/?q=new%20HttpException
Note: Unlocalized messages are acceptable in the 5xx range, because clients should rarely see them.