bbc / sqs-consumer

Build Amazon Simple Queue Service (SQS) based applications without the boilerplate
https://bbc.github.io/sqs-consumer/
Other
1.74k stars 333 forks source link

feat: add the ability to extend errors from aws #496

Closed nicholasgriffintn closed 4 months ago

nicholasgriffintn commented 4 months ago

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:

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:

codeclimate[bot] commented 4 months ago

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

github-actions[bot] commented 4 months ago

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