-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[CCR] The stats for an unknown index return a 200 status #37021
Copy link
Copy link
Closed
Labels
:Distributed/CCRIssues around the Cross Cluster State Replication featuresIssues around the Cross Cluster State Replication features>bug
Description
When we try to access the stats for a follower index that does not exist, we receive a 200 status with the following response
GET /unknown/_ccr/stats
Status 200
{
"indices": []
}
To be consistent with other APIs and follow REST standards, it should return a 404 status.
If we try the same with the /_stats API we do get the correct status
GET /unknown/_stats
Response
{
"error": {
"root_cause": [
{
"type": "index_not_found_exception",
"reason": "no such index [unknown]",
"resource.type": "index_or_alias",
"resource.id": "unknown",
"index_uuid": "_na_",
"index": "unknown"
}
],
"type": "index_not_found_exception",
"reason": "no such index [unknown]",
"resource.type": "index_or_alias",
"resource.id": "unknown",
"index_uuid": "_na_",
"index": "unknown"
},
"status": 404
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
:Distributed/CCRIssues around the Cross Cluster State Replication featuresIssues around the Cross Cluster State Replication features>bug
Type
Fields
Give feedbackNo fields configured for issues without a type.