bbc / sqs-consumer

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

fix: error handling of non-standard Error instances #405

Closed aradbar closed 1 year ago

aradbar commented 1 year ago

Fixes #403

Description: We encountered the following error from the error handler: TypeError: Cannot set property message of which has only a getter Whenever anything throws an error that for some reason doesn't have a settable message attribute.

Type of change:

Why is this change required?: The error TypeError: Cannot set property message of which has only a getter hides the original error

Code changes:


Checklist:

github-actions[bot] commented 1 year ago

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

aradbar commented 1 year ago

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

nicholasgriffintn commented 1 year ago

Thanks! I'll take a look through this asap!

codeclimate[bot] commented 1 year ago

Code Climate has analyzed commit b76cb74e and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

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 96.9% (1.8% change).

View more on Code Climate.