quickwit-oss/quickwit · error
unknown output format `{output_format_str}`. supported forma
Error message
unknown output format `{output_format_str}`. supported formats are: `table`, `json`, and `pretty-json` What it means
Commands that accept an output format (e.g. `split list --output`) only support `table`, `json`, and `pretty-json` (also spelled `pretty_json`). Any other value fails `from_str` conversion during argument parsing. The error enumerates the accepted values so the user can self-correct.
Source
Thrown at quickwit/quickwit-cli/src/split.rs:121
.arg_required_else_help(true)
}
#[derive(Debug, Eq, PartialEq)]
enum OutputFormat {
Table, // Default
Json,
PrettyJson,
}
impl FromStr for OutputFormat {
type Err = anyhow::Error;
fn from_str(output_format_str: &str) -> anyhow::Result<Self> {
match output_format_str {
"json" => Ok(OutputFormat::Json),
"pretty-json" | "pretty_json" => Ok(OutputFormat::PrettyJson),
"table" => Ok(OutputFormat::Table),
_ => bail!(
"unknown output format `{output_format_str}`. supported formats are: `table`, \
`json`, and `pretty-json`"
),
}
}
}
#[derive(Debug, PartialEq)]
pub struct ListSplitArgs {
pub client_args: ClientArgs,
pub index_id: IndexId,
pub offset: Option<usize>,
pub limit: Option<usize>,
pub split_states: Option<Vec<SplitState>>,
pub create_date: Option<OffsetDateTime>,
pub start_date: Option<OffsetDateTime>,
pub end_date: Option<OffsetDateTime>,
// pub tags: Option<TagFilterAst>,View on GitHub (pinned to a39730c5cd)
Solutions
- Use one of `--output table`, `--output json`, or `--output pretty-json`.
- Fix case: the match is lowercase and case-sensitive, so `JSON` must be `json`.
- Pipe JSON output through an external formatter (e.g. `jq` or `yq`) if you need yaml or other formats.
Example fix
// before quickwit split list --index my-index --output yaml // after quickwit split list --index my-index --output json | yq -P
Defensive patterns
Strategy: validation
Validate before calling
const OUTPUT_FORMATS = new Set(["table", "json", "pretty-json", "pretty_json"]);
function validateOutputFormat(fmt: string): string | null {
return OUTPUT_FORMATS.has(fmt) ? null : `unknown output format \`${fmt}\`; use table, json, or pretty-json`;
} Type guard
function isOutputFormat(v: string): v is "table" | "json" | "pretty-json" | "pretty_json" {
return ["table", "json", "pretty-json", "pretty_json"].includes(v);
} Prevention
- Use the exact lowercase literals `table`, `json`, or `pretty-json`.
- Define the format string once as a constant in scripts instead of typing it inline.
- Remember matching is case-sensitive; never uppercase format names.
When it happens
Trigger: Passing `--output yaml`, `--output pretty`, `--output JSON` (case-sensitive match), or any other string to a command whose `OutputFormat::from_str` is invoked.
Common situations: Assuming other formats like yaml/csv are supported; capitalization mismatch since matching is case-sensitive; copying `--output pretty` from another tool; shell completion absent so format names are typed by hand.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- `--commit-timeout` can only be used with --wait or --force o
- unknown source subcommand `{subcommand}`
- unknown split subcommand `{subcommand}`
- failed to parse --{}-date option parameter `{}`. supported f
- file extension `.{ext}` is not supported. supported file for
AI-assisted analysis of quickwit-oss/quickwit@a39730c5cd (2026-09-08).
Data as JSON: /api/errors/9d6b98dc1b01e37f.
Report an issue: GitHub.