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

chore: add descriptive error message to removeUnreachable #1048

Merged
merged 1 commit into from Dec 2, 2021

Conversation

tuner
Copy link
Contributor

@tuner tuner commented Dec 2, 2021

Nobody should see this message, but if they see, it probably makes a bit more sense after this PR.

Before:

TypeError: Cannot read properties of undefined (reading '$ref')
    at addReachable (/Users/klavikka/src/ts-json-schema-generator/src/Utils/removeUnreachable.ts:14:20)

After:

Error: Encountered a reference to a missing definition: "#/definitions/Union". This is a bug.
    at addReachable (/Users/klavikka/src/ts-json-schema-generator/src/Utils/removeUnreachable.ts:23:19)

@domoritz domoritz merged commit ca00bd9 into vega:next Dec 2, 2021
@domoritz
Copy link
Member

domoritz commented Dec 2, 2021

Thank you!

@tuner tuner deleted the sensible-error-in-remove-unreachable branch December 2, 2021 14:56
@github-actions
Copy link

🚀 PR was released in v0.97.1-next.0 🚀

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

Successfully merging this pull request may close these issues.

None yet

2 participants