botocore
botocore copied to clipboard
sso-oidc exceptions don't translate "error_description" into ClientError message field
The sso-oidc method CreateToken returns an error response that looks like:
{"error": "invalid_grant", "error_description": "Invalid grant provided"}
but on the botocore.errorfactory.InvalidGrantException object, the error.response["Error"]["Code"] is correct but error.response["Error"]["Message"] is an empty string.
This is using botocore 1.19.13
@benkehoe - Thank you for your post. While parsing a service response we expect the service to send error message with message attribute https://github.com/boto/botocore/blob/develop/botocore/parsers.py#L638
But in this case as the service is sending error_description instead of message, botocore is not able to parse that. Marking it as feature request.
Thanks. Seems like it should be part of the response shape. In this case, the error_description field is required by the OAuth spec: https://tools.ietf.org/html/rfc6749#section-5.2
Greetings! It looks like this issue hasn’t been active in longer than one year. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.