elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.61k stars 8.21k forks source link

Surface missing error details in the Index Management UI #107485

Open cjcenizal opened 3 years ago

cjcenizal commented 3 years ago

Deleting index templates

If you delete an index template that's in use by a data stream, you'll get back lots of error details but they aren't surfaced in the UI. Ideally you should be able to click a button in the error toast to get more info.

{
  "templatesDeleted": [
    "special%"
  ],
  "errors": [
    {
      "name": "special",
      "error": {
        "status": 400,
        "payload": {
          "message": "unable to remove composable templates [special] as they are in use by a data streams [special%]",
          "attributes": {
            "error": {
              "root_cause": [
                {
                  "type": "illegal_argument_exception",
                  "reason": "unable to remove composable templates [special] as they are in use by a data streams [special%]"
                }
              ],
              "type": "illegal_argument_exception",
              "reason": "unable to remove composable templates [special] as they are in use by a data streams [special%]"
            }
          }
        },
        "options": {
          "statusCode": 400,
          "body": {
            "message": "unable to remove composable templates [special] as they are in use by a data streams [special%]",
            "attributes": {
              "error": {
                "root_cause": [
                  {
                    "type": "illegal_argument_exception",
                    "reason": "unable to remove composable templates [special] as they are in use by a data streams [special%]"
                  }
                ],
                "type": "illegal_argument_exception",
                "reason": "unable to remove composable templates [special] as they are in use by a data streams [special%]"
              }
            }
          }
        }
      }
    }
  ]
}

Deleting component templates

Similarly, if you delete component templates that no longer exist, you'll get back lots of error details but they aren't surfaced in the UI. Ideally you should be able to click a button in the error toast to get more info.

{
  "itemsDeleted": [],
  "errors": [
    {
      "name": "trvdfvds",
      "error": {
        "status": 404,
        "payload": {
          "message": "trvdfvds",
          "attributes": {
            "error": {
              "root_cause": [
                {
                  "type": "resource_not_found_exception",
                  "reason": "trvdfvds"
                }
              ],
              "type": "resource_not_found_exception",
              "reason": "trvdfvds"
            }
          }
        },
        "options": {
          "statusCode": 404,
          "body": {
            "message": "trvdfvds",
            "attributes": {
              "error": {
                "root_cause": [
                  {
                    "type": "resource_not_found_exception",
                    "reason": "trvdfvds"
                  }
                ],
                "type": "resource_not_found_exception",
                "reason": "trvdfvds"
              }
            }
          }
        }
      }
    },
    {
      "name": "test",
      "error": {
        "status": 404,
        "payload": {
          "message": "test",
          "attributes": {
            "error": {
              "root_cause": [
                {
                  "type": "resource_not_found_exception",
                  "reason": "test"
                }
              ],
              "type": "resource_not_found_exception",
              "reason": "test"
            }
          }
        },
        "options": {
          "statusCode": 404,
          "body": {
            "message": "test",
            "attributes": {
              "error": {
                "root_cause": [
                  {
                    "type": "resource_not_found_exception",
                    "reason": "test"
                  }
                ],
                "type": "resource_not_found_exception",
                "reason": "test"
              }
            }
          }
        }
      }
    }
  ]
}
elasticmachine commented 3 years ago

Pinging @elastic/kibana-stack-management (Team:Stack Management)

elasticmachine commented 1 month ago

Pinging @elastic/kibana-management (Team:Kibana Management)