Is this possible to encode as a policy?
basically, I want to check if one of the input values is equal to some other value I'm passing as context to the action.
the policy evaluates to true and everything works when those values mach. But I'm getting a weird error when they don't match.
Is this possible to accomplish?
8 Replies
you've missed wrapping it in an
expr()
@sevenseacat that was a copy+paste mistake.
I just edit the original message
Hmm...that might be a bug? Or somehow you're setting the context somewhere to a keyword list instead of a map? Can you reproduce somewhere I can run?
This is how I'm setting up things in the controller:
event
and payload
are coming from the request.
here is the code from the domain
here is the action definition
and finally the policies
What is the stack trace for the error?
I forgot the first line:
This does look like a bug
If you could open an issue, and ideally create a small reproduction project or test case that reproduces the issue, I will look into it
will do it later today. thank you