-
Notifications
You must be signed in to change notification settings - Fork 681
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
Provide better error message when inspec.yml is invalid #1552
Conversation
@adamleff Awesome. That is so helpful for users.
I was playing with the idea for InSpec check:
Instead of showing a parse error, we should return a response with the error that the yml is not correct. What do you think. Should we do that in another PR? |
@chris-rock If you're talking about changing the output of If not though, can you restate your suggestion because I'm possibly not understanding it :) |
As discussed offline, we will do |
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.
It is so great to make the UX better @adamleff Thank you @graham1228 for reporting that issue.
Currently, if the inspec.yml for a profile is invalid (such as including an improperly-defined multi-line string), InSpec will throw an exception from the YAML parser that does not given a clear indication that the issue was encountered while parsing the inspec.yml file. This change introduces a better exception message to clue the user into where the problem actually lies. Signed-off-by: Adam Leff <[email protected]>
225fc7c
to
dfce561
Compare
Currently, if the inspec.yml for a profile is invalid (such as including
an improperly-defined multi-line string), InSpec will throw an exception
from the YAML parser that does not given a clear indication that the
issue was encountered while parsing the inspec.yml file.
This change introduces a better exception message to clue the user into
where the problem actually lies.
Fixes #1549.