Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing JSON fields vs panic #458

Open
d-sooter opened this issue Aug 2, 2024 · 0 comments
Open

Missing JSON fields vs panic #458

d-sooter opened this issue Aug 2, 2024 · 0 comments

Comments

@d-sooter
Copy link

d-sooter commented Aug 2, 2024

I want to use this rules engine to check iot data.

Since the data coming it can be dynamic or even just partial data, i wanted to ask what is the recommended way for handling those rules.

Basically im working with Json data and i dont know if i should add a nil check for all the fields used in the rule as the first part of the rule or if i should let it panic.

Would be great to have a property (something like AllowMissingFacts) the will skip over the rule if one of the values are missing

i guess an alternative is to check all the facts relevant to the rule first, but it seems a bit verbose

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

No branches or pull requests

1 participant