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

[BUG] Rules search returns 'Custom rules error' when there are no custom rules #205

Closed
jovancacvetkovic opened this issue Dec 20, 2022 · 0 comments
Labels
backport 2.x bug Something isn't working v2.5.0 2.5.0 release

Comments

@jovancacvetkovic
Copy link

What is the bug?
Rules search returns 'Custom rules error' when there are no custom rules. The status code returned is 500.

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Deploy OpenSearch, start, and open the application in a browser.
  2. The first page that loads is the overview page
  3. There is a backend API call to http://localhost:5601/_plugins/_security_analytics/rules/_search?prePackaged=false
  4. The result of the request is
    Original server response: statusCode: 500, response: '{"error":{"root_cause":[{"type":"security_analytics_exception","reason":"Custom rule index doesnt exist. Please create custom rules first."}],"type":"security_analytics_exception","reason":"Custom rule index doesnt exist. Please create custom rules first.","caused_by":{"type":"exception","reason":"java.lang.IllegalArgumentException: Custom rule index doesnt exist. Please create custom rules first."}},"status":500}',

What is the expected behavior?
This should not be an error but a response with status 200 with an empty array response.

Do you have any screenshots?
Custom rules error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x bug Something isn't working v2.5.0 2.5.0 release
Projects
None yet
Development

No branches or pull requests

3 participants