Correct error message for request token

When create a request token with header "requested_project_id",
Keystone raise the 400 error:
"Expecting to find requested_project_id in request".

The correct key is "Requested-Project-Id" which use - instead of _

This patch correct the misleading error message.

Change-Id: I2e619a2e7326d0c84756efbdce36d99b0bfbfc56
This commit is contained in:
wangxiyuan 2017-12-04 15:56:44 +08:00
parent 51d5b63a08
commit 4af3a43ab2
1 changed files with 1 additions and 1 deletions

View File

@ -237,7 +237,7 @@ class OAuthControllerV3(controller.V3Controller):
attribute='oauth_consumer_key', target='request')
if not requested_project_id:
raise exception.ValidationError(
attribute='requested_project_id', target='request')
attribute='Requested-Project-Id', target='request')
# NOTE(stevemar): Ensure consumer and requested project exist
self.resource_api.get_project(requested_project_id)