Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhelpful error message when no credentials are resolved #19

Open
mhassan1 opened this issue Mar 3, 2022 · 0 comments
Open

Unhelpful error message when no credentials are resolved #19

mhassan1 opened this issue Mar 3, 2022 · 0 comments

Comments

@mhassan1
Copy link
Owner

mhassan1 commented Mar 3, 2022

In aws/aws-sdk-js-v3#2408, @aws-sdk/credential-provider-node changed its behavior in the case where no AWS credentials are resolved. Prior to that change, it would throw the last error it encountered in the chain; after that change, it throws a generic CredentialsProviderError: Could not load credentials from any providers error.

When we upgraded @aws-sdk/credential-provider-node in #18, we opted in to that behavior. Prior to that upgrade, we re-threw the error from the last provider, which may (or may not) have been helpful to the user; after that upgrade, we re-throw the generic message from the AWS SDK, with no indication that the error came from this plugin.

One possible solution: we could catch the generic CredentialsProviderError and re-throw a more helpful error to let the user know that the error is happening inside this plugin. Or, more generically, we could namespace all errors thrown inside this plugin to make it clear where the error is coming from, since Yarn does not do that, automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant