This PR changes the wording of the spec to state the specific error type in all error scenarios.
I have found 34 occurrences of the word "error" in the spec. In most cases, the spec indicates the exact type of error, e.g., invalid-type, unknown-function, invalid-arity. However, there are three occurrences when no explicit error type is mentioned.
In two cases, I think the right error type is invalid-type. In the third case (Slices section), I'm not sure what the error type should be. Maybe invalid-value, but it's not specified anywhere in the spec (I see only three error types defined). Related to this, I have raised #116 to add a section for error handling.
- If the given step is 0, an error MUST be raised.
+ If the given step is 0, an `invalid-value` error MUST be raised.
invalid-value is indeed a new error type introduced in JMESPath Community that did not originally exists, but I think it’s a good error to report in this case.
This PR changes the wording of the spec to state the specific error type in all error scenarios.
I have found 34 occurrences of the word "error" in the spec. In most cases, the spec indicates the exact type of error, e.g.,
invalid-type
,unknown-function
,invalid-arity
. However, there are three occurrences when no explicit error type is mentioned.In two cases, I think the right error type is
invalid-type
. In the third case (Slices section), I'm not sure what the error type should be. Maybeinvalid-value
, but it's not specified anywhere in the spec (I see only three error types defined). Related to this, I have raised #116 to add a section for error handling.