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

Throw error retrieving non-existent SLM policy #47679

Merged
merged 1 commit into from
Oct 8, 2019

Conversation

dakrone
Copy link
Member

@dakrone dakrone commented Oct 7, 2019

Previously when retrieving an SLM policy it would always return a 200
with {} in the body, even if the policy did not exist. This changes
that behavior to throw an error (similar to our other APIs) if a
policy doesn't exist.

This also adds a basic CRUD yml test for the behavior.

Resolves #47664

Previously when retrieving an SLM policy it would always return a 200
with `{}` in the body, even if the policy did not exist. This changes
that behavior to throw an error (similar to our other APIs) if a
policy doesn't exist.

This also adds a basic CRUD yml test for the behavior.

Resolves elastic#47664
@dakrone dakrone added >bug :Data Management/ILM+SLM Index and Snapshot lifecycle management v8.0.0 v7.5.0 v7.4.1 labels Oct 7, 2019
@dakrone dakrone requested a review from gwbrown October 7, 2019 17:16
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (:Core/Features/ILM)

@dakrone
Copy link
Member Author

dakrone commented Oct 7, 2019

@elasticmachine run elasticsearch-ci/packaging-sample

Copy link
Contributor

@gwbrown gwbrown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dakrone dakrone merged commit ead99f1 into elastic:master Oct 8, 2019
@dakrone dakrone deleted the slm-add-crud-yml branch October 8, 2019 01:53
dakrone added a commit that referenced this pull request Oct 8, 2019
Previously when retrieving an SLM policy it would always return a 200
with `{}` in the body, even if the policy did not exist. This changes
that behavior to throw an error (similar to our other APIs) if a
policy doesn't exist.

This also adds a basic CRUD yml test for the behavior.

Resolves #47664
dakrone added a commit that referenced this pull request Oct 8, 2019
Previously when retrieving an SLM policy it would always return a 200
with `{}` in the body, even if the policy did not exist. This changes
that behavior to throw an error (similar to our other APIs) if a
policy doesn't exist.

This also adds a basic CRUD yml test for the behavior.

Resolves #47664
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Snapshot Lifecycle Policy API return empty object instead 404 when policy not exist
4 participants