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: error handling of non-standard Error instances #405

Merged
merged 6 commits into from
Jun 9, 2023

Conversation

aradbar
Copy link
Contributor

@aradbar aradbar commented Jun 5, 2023

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:

  • 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?:
The error TypeError: Cannot set property message of which has only a getter hides the original error

Code changes:


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.

@aradbar aradbar requested review from a team as code owners June 5, 2023 14:58
@github-actions
Copy link

github-actions bot commented Jun 5, 2023

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

@aradbar
Copy link
Contributor Author

aradbar commented Jun 5, 2023

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

@nicholasgriffintn
Copy link
Member

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

@codeclimate
Copy link

codeclimate bot commented Jun 5, 2023

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

@nicholasgriffintn nicholasgriffintn changed the title Fix: error handling of non-standard Error instances fix: error handling of non-standard Error instances Jun 6, 2023
@nicholasgriffintn nicholasgriffintn merged commit ad1ffd6 into bbc:main Jun 9, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jun 9, 2023
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.

handleMessage does not allow for an injected process method
2 participants