-
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>enhancementhelp wantedadoptmeadoptme
Description
Today, if a request is executed against an endpoint with a method in the request line that that endpoint does not support, Elasticsearch responds with a response like:
{
"error" : {
"root_cause" : [ {
"type" : "illegal_argument_exception",
"reason" : "No feature for name [_forcemerge]"
} ],
"type" : "illegal_argument_exception",
"reason" : "No feature for name [_forcemerge]"
},
"status" : 400
}
This is confusing for users*, semantically wrong, and contrary to the HTTP spec. Instead, Elasticsearch should respond with HTTP status code 405 (Method Not Allowed) and include in the Allow header a list of methods that the endpoint does support.
*: Googling "no feature for name elasticsearch" just leads to pages describing issues when an index is missing.
Metadata
Metadata
Assignees
Labels
:Core/Infra/REST APIREST infrastructure and utilitiesREST infrastructure and utilities>enhancementhelp wantedadoptmeadoptme