Skip to content

Snapshot Lifecycle Policy API return empty object instead 404 when policy not exist #47664

@disaster37

Description

@disaster37

Elasticsearch version (bin/elasticsearch --version): 7.4.0

Plugins installed: []

JVM version (java -version):

OS version (uname -a if on a Unix-like system):

Description of the problem including expected versus actual behavior:

Actual:
When get Snapshot lifecycle api with policy not exist, it wil return empty Object {}
-> GET /_slm/policy/policy-not-exist
-> it return {} with status 200

Expected:
-> It return status 404

Steps to reproduce:

curl -XGET http://127.0.0.1:9200/_slm/policy/policy-not-exist

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions