-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Core/Infra/REST APIREST infrastructure and utilitiesREST infrastructure and utilities>bugTeam:Core/InfraMeta label for core/infra teamMeta label for core/infra team
Description
In https://discuss.elastic.co/t/ilm-retry-api-not-honoring-timeouts/281772 a user reported confusion over the way that Elasticsearch ignored the parameters in this request:
POST */_ilm/retry
{
"timeout": "30m",
"master_timeout": "30m"
}
The immediate solution was to move the parameters into the URL where they belong, but the question highlights a broader problem: if an API endpoint expects a request body then we parse the body fairly strictly and reject requests that contain unexpected things, but if the endpoint doesn't expect a body at all then we seem to leniently accept requests with a body anyway. Silently ignoring input like this is confusing, and I think we should have rejected this request with a 400 Bad request instead.
sunnyakaxd
Metadata
Metadata
Assignees
Labels
:Core/Infra/REST APIREST infrastructure and utilitiesREST infrastructure and utilities>bugTeam:Core/InfraMeta label for core/infra teamMeta label for core/infra team