question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to get failed rules from .run method?

See original GitHub issue

As I understood, the engine.run() method return all the successfull events. I know that we have a failure event, triggered per rule, where I could hook a callback, but that’s not what I’m looking for. What could be done to make engine.run() return booth, success and failed rules, an array of RuleResults maybe?

I’m using this, but it does not look good to me.

var failedRules = [];
engine1.on("failure", (event, almanac, ruleResult) => {
   failedRules.push(event);
});

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
adamklcommented, Mar 24, 2020

@CacheControl This is a feature I’d like as well.

I’ll try to put together a PR this week.

1reaction
CacheControlcommented, Dec 22, 2020

Both failureEvents and failureResults are now returned by engine.run() in v6.0.0. See changelog

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to find failed rules in json-rules-engine - Stack Overflow
Solution: Define multiple rule objects and pass to the engine and derive the failed rules. Details: 1. From the above example, in the...
Read more >
There was an error reading the rules from the server. The ...
You can try running outlook.exe /cleanrules to reset the rule engine and rebuild the rules on server again.(If you have multiple or additional ......
Read more >
Run-a-Script Rules Missing in Outlook - Slipstick Systems
I had my pc rebuilt and have allowed unsafe rules. The rule will move a file to a folder but doesn't run the...
Read more >
How to Fix Outlook Rules Not Working in Windows 10
Method 1. Optimize the size of your rules · Rename lengthy rule names. Don't give long, complicated names when creating a new rule....
Read more >
[Solved] Outlook Rules Are Not Working | Complete Guide
Get Expert tips to resolve the issue when Outlook rules not working in ... the rule is client-based and Outlook is not running...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found