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: add the ability to extend errors from aws #496

Merged
merged 4 commits into from
May 8, 2024

Conversation

nicholasgriffintn
Copy link
Member

Resolves #495

Description:

Adds the ability to set a new prop extendedAWSErrors is the options in order to extend the output of toSQSError with the response and metadata information from AWS.

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 for better debugging, but also makes it controllable, by default the error response will be minimal and remain as it is today.

Code changes:

  • Updated types to support response and metadata and align closer to AWS
  • Added a new option, extendedAWSErrors to extend the error contents with both response and metadata.

@nicholasgriffintn nicholasgriffintn requested review from a team as code owners May 6, 2024 15:25
Copy link

codeclimate bot commented May 6, 2024

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

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

This pull request will bring the total coverage in the repository to 97.9% (-0.3% change).

View more on Code Climate.

Copy link

github-actions bot commented May 6, 2024

LCOV of commit d1272ea during Comment PR Coverage #15

Summary coverage rate:
  lines......: 98.0% (871 of 889 lines)
  functions..: 100.0% (34 of 34 functions)
  branches...: 94.2% (161 of 171 branches)

Files changed coverage rate:
                   |Lines       |Functions  |Branches    
  Filename         |Rate     Num|Rate    Num|Rate     Num
  =======================================================
  src/consumer.ts  |97.6%    629| 100%    21|93.7%    127
  src/errors.ts    |98.4%    126| 100%     7|91.7%     12

@nicholasgriffintn nicholasgriffintn merged commit f4b071b into main May 8, 2024
9 checks passed
@nicholasgriffintn nicholasgriffintn deleted the extendedAWSErrors branch May 8, 2024 17:22
@github-actions github-actions bot locked and limited conversation to collaborators May 8, 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.

[Feature Request]: Enhance SQSError with AWS error $response object for Better Debugging
1 participant