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 on non-Error type errors #983

Conversation

lukealvoeiro
Copy link
Collaborator

Description

Small issue noticed with the behavior of the default service implementation handleError method. If the throw error was an instance of Error, then the handleError function is called correctly. However, if it was not, we had a check that prevented handleError from called. This isn't desired behavior as errors can be strings.

Testing performed

Tested in a consuming application and this issue is resolved. Unit tests have been updated and are passing.

@stephenh
Copy link
Owner

Makes sense, thanks @lukealvoeiro !

@stephenh stephenh merged commit 8c567fc into stephenh:main Dec 31, 2023
6 checks passed
stephenh pushed a commit that referenced this pull request Dec 31, 2023
## [1.166.2](v1.166.1...v1.166.2) (2023-12-31)

### Bug Fixes

* error handling on non-Error type errors ([#983](#983)) ([8c567fc](8c567fc))
@stephenh
Copy link
Owner

🎉 This PR is included in version 1.166.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants