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

Improved error handling #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sebastien-rosset
Copy link

@sebastien-rosset sebastien-rosset commented Mar 26, 2023

This PR improves error handling.

  1. Consistently return SyntaxError. Previously, some syntax errors were reported as SyntaxError and in other cases it was just an error string.
  2. Add typ field in SyntaxError. The typ is set to the error string values defined in the JMESpath specification such as invalid-type and unknown-function.
  3. Create constants for error types that are defined in the specification.
  4. In compliance tests, validate the actual error type matches the expectation. Previously, the compliance suite was only validating the error is not nil.

Improve error validation in compliance tests.
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

Successfully merging this pull request may close these issues.

1 participant