Useful error messages are sometimes not surfaced to the user.
Some services such as OIDC supply the non-standard error_description SDK field on some errors. If it is present, it contains more useful information than the default message field. But our error handling does not surface this field.
Problem
error_description
SDK field on some errors. If it is present, it contains more useful information than the defaultmessage
field. But our error handling does not surface this field.Solution
findBestErrorInChain()
(renamed fromfindPrioritizedAwsError
) to search the full "cause chain".getErrorMsg()
and use it infindBestErrorInChain()
.License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.