orquesta icon indicating copy to clipboard operation
orquesta copied to clipboard

"ExpressionEvaluationException: Unable to resolve key" error should include list of available keys

Open blag opened this issue 6 years ago • 1 comments

Orquesta/Jinja/YAQL currently throws an error when you try to use a key that does not exist:

"YaqlEvaluationException: Unable to resolve key 'result' in expression '<% result().result.output %>' from context."

But this leaves you guessing as to what valid keys you can use.

It would greatly ease workflow development if we dumped a list of valid keys in the error message:

"YaqlEvaluationException: Unable to resolve key 'result' in expression '<% result().result.output %>' from context; must be one of 'option1', 'option2', or 'option3'."

But if we want to avoid l10n/i18n issues with lists (I'm also not sure we handle this at all), we can also simply dump an array of options:

"YaqlEvaluationException: Unable to resolve key 'result' in expression '<% result().result.output %>' from context; must be one of ['option1', 'option2', 'option3']."

blag avatar May 10 '19 22:05 blag

Try to place output before the result like <% result().output.result %>

ghost avatar Jan 14 '20 18:01 ghost