Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR][DAC] raise a better exception for missing contents in config files #3621

Closed
brokensound77 opened this issue Apr 27, 2024 · 0 comments · Fixed by #3653 or elastic/DaC-Reference#8
Closed
Assignees
Labels
detections-as-code enhancement New feature or request python Internal python for the repository

Comments

@brokensound77
Copy link
Contributor

Note: this work will target the DAC-feature branch

related to #3407


As part of #3407, the init setup new files, but blank. If a user runs tests or the loader before populating them, an error will raise (such as for missing info in the new packages.yml file). However, it will not be obvious as to why. We should wrap this to be more explanatory as to why the error is raising.

A candidate option would be to do it here:

https://github.com/elastic/detection-rules/blob/DAC-feature/detection_rules/config.py#L198

and assert that any required contents are populated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
detections-as-code enhancement New feature or request python Internal python for the repository
Projects
None yet
3 participants