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

Support passing error objects to HealthCheckError #175

Merged
merged 4 commits into from Mar 15, 2021

Conversation

chriswiggins
Copy link
Contributor

Reading through the README, one would assume that by using the custom HealthCheckError class we'd be able to pass errors caught in the Promise.all and see these returned in the result.

As errors passed to JSON.stringify just result in an empty object being output (normally), a custom replacer function is now included to fix that

Let me know if there's anything else that needs to be done to have this included. Terminus has been fantastic in our k8s environment!

Copy link
Collaborator

@gergelyke gergelyke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the contribution! I am ok with landing this once my comment is addressed

lib/terminus.spec.js Outdated Show resolved Hide resolved
@chriswiggins
Copy link
Contributor Author

@gergelyke take a look at that and tell me what you think.

FYI the types for optional variables didn't need to be a union, we just need to specify verbatim as an optional type (meaning it is allowed to be undefined). I've done __unsafeAllowStackTraces in the same manner

@gergelyke gergelyke merged commit b8d8fdb into godaddy:master Mar 15, 2021
@gergelyke
Copy link
Collaborator

thanks @chriswiggins 🙇

@rxmarbles
Copy link
Member

🎉 This PR is included in version 4.7.0 🎉

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.

None yet

3 participants