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

fix: handle CredentialsProviderError from AWS SDK JS v3 #474

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

jamesmbourne
Copy link
Contributor

@jamesmbourne jamesmbourne commented Mar 12, 2024

Resolves #473

Description:

AWS surfaces a CredentialsProviderError when credentials could not be loaded from any providers, SQS Consumer doesn't currently handle this.

Type of change:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Why is this change required?:
Handle error thrown by AWS SDK for JavaScript v3 which should be treated as an authentication failure.

Code changes:

  • The isConnectionError function will return true when passed a CredentialsProviderError

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@jamesmbourne jamesmbourne requested review from a team as code owners March 12, 2024 14:24
Copy link

github-actions bot commented Mar 12, 2024

CLA Assistant Lite bot CLA CHECK All Contributors have signed the CLA

@jamesmbourne
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

Copy link

codeclimate bot commented Mar 12, 2024

Code Climate has analyzed commit 5b4cfea and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (80% is the threshold).

This pull request will bring the total coverage in the repository to 98.3% (0.0% change).

View more on Code Climate.

Copy link
Member

@nicholasgriffintn nicholasgriffintn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for raising the issue and a PR to fix this!

This looks fine to me.

@nicholasgriffintn nicholasgriffintn merged commit 9a14d66 into bbc:main Mar 12, 2024
7 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: CredentialsProviderError is not treated as a connection error
2 participants