Skip to content

Missing JSON fields vs panic #458

Open
@d-sooter

Description

@d-sooter

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions