Comment 0 for bug 1674415

Revision history for this message
prashkre (prashkre) wrote : keystone exception messages are not translating when locale is set

When user invokes identity API's on an environment with locale(other than default locale en_US) being set, keystone.exception messages are not getting translated in case of any error messages from identity API.

For example: we are requesting to get list of projects without authtoken and Accept-Language: de.

curl -g -i --insecure -X GET https://<<hostname>>:5000/v3/projects? -H "User-Agent: python-keystoneclient" -H "Accept: application/json" -H "Accept-Language: de"
HTTP/1.1 401 Unauthorized
Date: Mon, 20 Mar 2017 14:31:54 GMT
Server: Apache
Vary: X-Auth-Token
x-openstack-request-id: req-63b4b8ae-e8fc-4a6d-9744-cc9bc268c6c2
WWW-Authenticate: Keystone uri="https://<<hostname>>:5000"
Content-Length: 114
Content-Type: application/json

Actual Result:
{"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}

Expected Result:
{"error": {"message": "Die von Ihnen gestellte Anfrage erfoderdert eine Authentifizierung.", "code": 401, "title": "Unauthorized"}}