Skip to content

Top level commands run even without required options #103

Description

@l-trotta

Tested with index and delete, I expected them to fail without the required options, instead they run on some default input:

Delete (expected index and id to be required)

❄ laura@laura-thinkpad-p1-gen5:~ ❄  elastic es delete
{
  "error": {
    "code": "transport_error",
    "status_code": 404,
    "body": {
      "error": {
        "root_cause": [
          {
            "type": "index_not_found_exception",
            "reason": "no such index [{index}]",
            "resource.type": "index_or_alias",
            "resource.id": "{index}",
            "index_uuid": "_na_",
            "index": "{index}"
          }
        ],
        "type": "index_not_found_exception",
        "reason": "no such index [{index}]",
        "resource.type": "index_or_alias",
        "resource.id": "{index}",
        "index_uuid": "_na_",
        "index": "{index}"
      },
      "status": 404
    }
  }
}

Index (expected index to be required)

❄ laura@laura-thinkpad-p1-gen5:~ ❄  elastic es index
{
  "error": {
    "code": "transport_error",
    "status_code": 405,
    "body": {
      "error": "Incorrect HTTP method for uri [/{index}/_doc] and method [PUT], allowed: [POST]",
      "status": 405
    }
  }
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions