Skip to content

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