jmespath / jmespath.jep

Proposals for extending the JMESPath Language.
8 stars 5 forks source link

proposal to add 'error' function #27

Open sebastien-rosset opened 1 year ago

sebastien-rosset commented 1 year ago

This PR creates a JEP to address #22.

The proposal is to add a new error function that takes a string expression. If the error function is evaluated, an error is raised with the specified message.

((status == 'up') && `1`) || ((status == 'down') && `0`) || error(join('invalid-value:', [status]))