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

improve output on invalid JSON in an example #28

Open
bpytlik opened this issue Aug 7, 2015 · 1 comment
Open

improve output on invalid JSON in an example #28

bpytlik opened this issue Aug 7, 2015 · 1 comment

Comments

@bpytlik
Copy link

bpytlik commented Aug 7, 2015

When an example isn't valid JSON, the error you get looks like this:
AssertionError: Invalid JSON:
undefined
Error: expected [Function] to not throw an error but 'SyntaxError: Unexpected string' was thrown

Followed by a stack trace. It would be nice if:
a) the error identified that it was the example and not the json schema that was invalid.
b) the error provided more information about what was invalid, perhaps via something like json-lint

This seems in the same vein as issue #19.

@cybertk
Copy link
Owner

cybertk commented Aug 10, 2015

See PR #29

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

No branches or pull requests

2 participants