-
Notifications
You must be signed in to change notification settings - Fork 90
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(src/plugins/utils/findOctetSequencePaths.js): Show path to erring… #190
fix(src/plugins/utils/findOctetSequencePaths.js): Show path to erring… #190
Conversation
f79dd0b
to
f9f0253
Compare
Sorry about how the title on this PR got chowdered, but I tried to use |
f805836
to
86bf00b
Compare
… element on exception Recently, I ran across an issue where [if the validator throws an exception in a specific part of the code, the path to the exception-causing code is swallowed](IBM#180). After a moderate amount of digging, I decided that an option for providing more information about this code would be to put the path to the problematic element or elements into the exception message. This exception message is displayed whenever the code crashes out. So, for example, the previous error message output by lint-openapi would say "Cannot read property 'type' of null", whereas the new error would list the full path to the type that was causing the exception. re IBM#180
14cc5c4
to
54e7fa8
Compare
Hey @dpopp07 @jorge-ibm and @mkistler - I know this probably isn't high on your priority list, but I do think this code would help out the community. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks for the detailed tests for that module as well
I figured being a good citizen meant bumping up the test coverage as well. Hope this project goes great in the future! I might have one more PR for the infinite recursion issue (#179). |
🎉 This PR is included in version 0.31.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
… element on exception
Recently, I ran across an issue where if the validator throws an
exception in a specific part of the code, the path to the
exception-causing code is swallowed.
After a moderate amount of digging, I decided that an
option for providing more information about this code
would be to put the path to the problematic element or
elements into the exception message. This exception
message is displayed whenever the code crashes out. So,
for example, the previous error message output by
lint-openapi was the following:
After this change, the output should be the following:
re #180