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 error message for missing json property in constructor #110

Closed
rozele opened this issue Nov 22, 2019 · 1 comment
Closed

Improve error message for missing json property in constructor #110

rozele opened this issue Nov 22, 2019 · 1 comment

Comments

@rozele
Copy link

rozele commented Nov 22, 2019

Given the following:

new JSONPath({ path: "$" })

The error message is:

You must supply a "path" property when providing an object argument to JSONPath.evaluate().

It should probably be:

You must supply a "json" property when providing an object argument to JSONPath.evaluate().
@brettz9
Copy link
Collaborator

brettz9 commented Nov 23, 2019

Added in v2.0.0. Thanks for the report.

Note that if json is present but undefined, it will still not throw, as there is the potential one is trying to query undefined.

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