{"record":{"id":"8b752b3649eefa8d","repo":"quickwit-oss/quickwit","slug":"failed-to-fetch-splits","errorCode":null,"errorMessage":"Failed to fetch splits.","messagePattern":"Failed to fetch splits\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-cli/src/split.rs","lineNumber":347,"sourceCode":"        .splits(&args.index_id)\n        .mark_for_deletion(args.split_ids)\n        .await?;\n    println!(\n        \"{} Splits successfully marked for deletion.\",\n        \"✔\".color(GREEN_COLOR)\n    );\n    Ok(())\n}\n\nasync fn describe_split_cli(args: DescribeSplitArgs) -> anyhow::Result<()> {\n    debug!(args=?args, \"describe-split\");\n    let qw_client = args.client_args.client();\n    let list_splits_query_params = ListSplitsQueryParams::default();\n    let split = qw_client\n        .splits(&args.index_id)\n        .list(list_splits_query_params)\n        .await\n        .expect(\"Failed to fetch splits.\")\n        .into_iter()\n        .find(|split| split.split_id() == args.split_id.as_str())\n        .with_context(|| {\n            format!(\n                \"could not find split metadata in metastore {}\",\n                args.split_id\n            )\n        })?;\n\n    println!(\"{}\", make_split_table(&[split], \"Split\"));\n\n    // TODO: if we have access to the storage, we could fetch that.\n    // let split_file = PathBuf::from(format!(\"{}.split\", args.split_id));\n    // let (split_footer, _) = read_split_footer(index_storage, &split_file).await?;\n    // let stats = BundleDirectory::get_stats_split(split_footer.clone())?;\n    // let hotcache_bytes = get_hotcache_from_split(split_footer)?;\n\n    // let mut file_rows = Vec::new();","sourceCodeStart":329,"sourceCodeEnd":365,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-cli/src/split.rs#L329-L365","documentation":"describe_split_cli fetches all splits for an index from the metastore through the Quickwit REST client and panics with expect(\"Failed to fetch splits.\") if the HTTP call fails. The panic discards the underlying transport/HTTP error, so a network problem, wrong URL, or server 5xx all surface as this bare message.","triggerScenarios":"Calling `quickwit split describe` where the client's GET of split list fails: quickwit server unreachable, wrong --endpoint-url, authentication rejected, or the server returning a non-success status.","commonSituations":"Quickwit node not running or wrong port in endpoint config; TLS certificate issues; transient network partitions; the metastore (e.g. PostgreSQL) behind the server being down.","solutions":["Verify the quickwit server is reachable: `curl <endpoint-url>/health/readyz`.","Check --endpoint-url / QW_CONFIG endpoint settings point at the right host and port.","Inspect quickwit server logs for the underlying metastore error and retry after it recovers."],"exampleFix":"// before\n.expect(\"Failed to fetch splits.\")\n// after\n.context(\"Failed to fetch splits.\")?  // preserves the underlying client error via anyhow","handlingStrategy":"try-catch","validationCode":"curl -fsS \"$QW_ENDPOINT/health/readyz\" || echo 'quickwit server not reachable'","typeGuard":null,"tryCatchPattern":"let split = client.splits(&index_id).list(params).await\n    .context(\"Failed to fetch splits.\")?  // keeps HTTP/network cause instead of panic","preventionTips":["Confirm the server URL/port before running split commands.","Check `quickwit service is-ready` or the readyz endpoint first.","Look at server-side logs for metastore connectivity (Postgres) problems."],"tags":["cli","metastore","network","http"],"backgroundTag":"http-request-failed","analyzedSha":"a39730c5cdcd1a4fe798403737ae293999ea21f8","analyzedAt":"2026-09-08T13:19:37.784Z","contentChangedAt":"2026-09-08T13:19:37.784Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}