Skip to content

Commit e6e71dc

Browse files
Enhance Readability of KQL validation check failures
1 parent aca416a commit e6e71dc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

detection_rules/rule_validators.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@ def validate(self, data: QueryRuleData, meta: RuleMeta, max_attempts: int = 10)
158158
# auto add the field and re-validate
159159
self.auto_add_field(validation_checks["stack"], data.index_or_dataview[0])
160160
else:
161-
raise ValueError(f"Error in both stack and integrations checks: {validation_checks}")
161+
click.echo(f"Stack Error Trace: {validation_checks["stack"]}")
162+
click.echo(f"Integrations Error Trace: {validation_checks["integrations"]}")
163+
raise ValueError("Error in both stack and integrations checks")
162164

163165
else:
164166
break

0 commit comments

Comments
 (0)