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

Compliant error reporting #40

Open
springcomp opened this issue Mar 1, 2023 · 3 comments
Open

Compliant error reporting #40

springcomp opened this issue Mar 1, 2023 · 3 comments

Comments

@springcomp
Copy link
Contributor

While working on this project I noticed that compliance tests that check for errors do not in fact enforce the specific error type. They only report success if any error occurred.

This issue is a reminder to please, consider reporting compliant errors and enforcing checks for speciied error types, like invalid-type, syntax, etc.

@eddycharly
Copy link
Collaborator

Not sure i fully understand the issue. Can you elaborate on what needs to be done ?

@springcomp
Copy link
Contributor Author

Currently, the compliance test suite will mandate specific error types, like invalid-type or invalid-arity.
A standards compliant implementation must raise those compliant error types, although case and hyphens are loosely checked.

So an implementation that just checks that indeed, an error occured is somewhat OK. As is done in this repo.
But better is to check that the expected error is reported.

So where invalid-type is expected, a standards compliant implementation may raise any of the following errors:

  • invalid type!
  • an invalid type error occurred
  • Invalid type: the function x expected argument was string but number was received instead.

@springcomp
Copy link
Contributor Author

jmespath/go-jmespath#83

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