hyperjumptech/grule-rule-engine

Getting panics in case a nil knowledgebase is passed to execute or fetch matching rules method

Pandey-SaurabhP opened this issue · 0 comments

Describe the bug
We are getting a panic in cases a nil knowledgebase is passed to execute or fetch matching rules method

To Reproduce
Steps to reproduce the behavior:

  1. Write a unit test
  2. Create a new instance of the rule engine
  3. Call the exceute method of the rule engine and with a nil value
  4. I see that we are getting a panic here
image 6. Same for FetchMatchingRules method

Expected behavior
A clear error message should be thrown so that user can debug properly on what went wrong