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

feat: extend authentication error to handle more codes #489

Merged
merged 2 commits into from
Apr 27, 2024

Conversation

nicholasgriffintn
Copy link
Member

@nicholasgriffintn nicholasgriffintn commented Apr 27, 2024

Resolves #484

Description:

SQS Consumer does not currently handle some other connection / authentication errors that SQS sends out. This PR extends the code to handle these as connection errors, which will cause the polling timeout to be extended.

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?:

This allows users to better respond to these issues and stops the consumer from pinging SQS too often as these errors are expected to persist for some time.

Code changes:

  • Extended isConnectionError to handle InvalidAddress | InvalidSecurity | QueueDoesNotExist | RequestThrottled | OverLimit
  • Added the code to the debug logger so that the user can see why an authentication error occurred.

@nicholasgriffintn nicholasgriffintn added this to the 10.1.0 milestone Apr 27, 2024
@nicholasgriffintn nicholasgriffintn requested review from a team as code owners April 27, 2024 16:27
Copy link

codeclimate bot commented Apr 27, 2024

Code Climate has analyzed commit a495cba 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.

@nicholasgriffintn nicholasgriffintn merged commit 45f0916 into main Apr 27, 2024
8 checks passed
@nicholasgriffintn nicholasgriffintn deleted the extend-authentication-error branch April 27, 2024 16:35
@github-actions github-actions bot locked and limited conversation to collaborators Apr 27, 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]: When consumer fails to react to SQS instant retry occurs
1 participant