feat: add unhandled error to append useful information #2063
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR wraps every interaction with node parsers and type formatters aroung a catch that rethrows an
UnhandledError
.This way, for example, if
BooleanTypeNodeParser
had a code like this:Instead of just seeing: (Which almost always doesn't say anything useful)
we can see which part of user's code triggered this error.
This is a big improvement to users, so they can debug issues themselves with more clarity of what is breaking and for us in reported issues to reduce the number of issues where the only useful information is the stack trace, like #1861 or #1756 and many others I'm sure you've already saw.
📦 Published PR as canary version:
2.3.1--canary.2063.403e019.0
✨ Test out this PR locally via:
Version
Published prerelease version:
v2.4.0-next.4
Changelog
🎉 This release contains work from a new contributor! 🎉
Thank you, Bence Balogh (@baloghbence0915), for all your work!
🚀 Enhancement
--expose all
with generic types #2009 (@arthurfiorette)🐛 Bug Fix
next
🔩 Dependency Updates
Authors: 4