Open AWSHurneyt opened 9 months ago
Hey can I do this
@shanjare2002 Sure! Feel free to raise a PR.
@shanjare2002 are you fixing this?
Hi @AWSHurneyt @eirsep If this is still pending. I would like to contribute, you can assign me.
Hi @ishag4! Yes, this is still a pending item. I've assigned you to this issue. Thank you for helping out!
What is the bug? The GetAlerts API throws a
404 NOT_FOUND
error when there are no detectors for the specifieddetectorType
. https://github.com/opensearch-project/security-analytics/blob/main/src/main/java/org/opensearch/securityanalytics/transport/TransportGetAlertsAction.java#L126This can cause a built-up of
4xx
errors on clusters that make regular/repeated calls to that API.What is the expected behavior? Rather than throw an error, the GetAlerts API could be refactored to instead return an empty list when there are no detectors defined for the specified
detectorType
.