Can we improve this generic errror got 1 error(s) in grl the script
#246
-
Hi @newm4n , @niallnsec Context: err := ruleBuilder.BuildRuleFromResource(kbType, constants.KnowledgeBaseVersion, byteArr) Error is: got 1 error(s) in grl the script It would be tough for me to go through all rules and figure out which rule is having the above issue and also the error is so generic and doesn't point to the rule which is having the issue. Can we improve this error message ? if yes, can you give me some pointers, so i can work on it. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The returned error should be for type *GruleErrorReporter, so you can type assert and access the embedded Errors array which will hopefully give you a more specific and useful error. |
Beta Was this translation helpful? Give feedback.
The returned error should be for type *GruleErrorReporter, so you can type assert and access the embedded Errors array which will hopefully give you a more specific and useful error.