{"record":{"id":"8c73b42c78fe5969","repo":"cilium/cilium","slug":"invalid-output-format-s-8c73b4","errorCode":null,"errorMessage":"invalid output format: %s","messagePattern":"invalid output format: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"hubble/cmd/status/status.go","lineNumber":109,"sourceCode":"\tss, err := getStatus(ctx, conn)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to get hubble server status: %w\", err)\n\t}\n\n\tvar opts = []printer.Option{\n\t\tprinter.Writer(out),\n\t}\n\tswitch formattingOpts.output {\n\tcase \"compact\":\n\t\topts = append(opts, printer.Compact())\n\tcase \"dict\":\n\t\topts = append(opts, printer.Dict())\n\tcase \"json\", \"JSON\", \"jsonpb\":\n\t\topts = append(opts, printer.JSONPB())\n\tcase \"tab\", \"table\":\n\t\topts = append(opts, printer.Tab())\n\tdefault:\n\t\treturn fmt.Errorf(\"invalid output format: %s\", formattingOpts.output)\n\t}\n\tp := printer.New(opts...)\n\tif err := p.WriteServerStatusResponse(ss); err != nil {\n\t\treturn err\n\t}\n\treturn p.Close()\n}\n\nfunc getHC(ctx context.Context, conn *grpc.ClientConn) (healthy bool, status string, err error) {\n\treq := &healthpb.HealthCheckRequest{Service: v1.ObserverServiceName}\n\tresp, err := healthpb.NewHealthClient(conn).Check(ctx, req)\n\tif err != nil {\n\t\treturn false, \"\", err\n\t}\n\tif st := resp.GetStatus(); st != healthpb.HealthCheckResponse_SERVING {\n\t\treturn false, fmt.Sprintf(\"Unavailable: %s\", st), nil\n\t}\n\treturn true, \"Ok\", nil","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/cilium/cilium/blob/ac7b90affa4baf0642e6685319d56907b3a73a6d/hubble/cmd/status/status.go#L91-L127","documentation":"runStatus validates the --output flag against known printer formats (compact, json/jsonpb, tab/table, etc.). Any unrecognized value hits the default branch and yields 'invalid output format: %s'.","triggerScenarios":"Running `hubble status --output <value>` where value is not one of compact|json|JSON|jsonpb|tab|table (and the configured aliases).","commonSituations":"Typos like `--output=jason`, `--output yaml` (yaml is unsupported), or scripts passing a format copied from another tool.","solutions":["Use one of the supported values: compact, json, jsonpb, tab or table.","Check exact spelling/case; the accepted set is small and case-sensitive for json aliases (json/JSON/jsonpb).","Run `hubble status --help` to list valid --output values.","If you need yaml, pipe the json output through a converter (e.g. `| y`)."],"exampleFix":"// before\nhubble status --output yaml\n// after\nhubble status --output json","handlingStrategy":"validation","validationCode":"var validFormats = map[string]bool{\n    \"compact\": true, \"json\": true, \"JSON\": true, \"jsonpb\": true,\n    \"tab\": true, \"table\": true,\n}\nif !validFormats[output] {\n    return fmt.Errorf(\"invalid output format: %s\", output)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only pass --output values listed in `hubble status --help`.","Validate the flag in wrapper scripts before invoking.","Remember yaml is not supported; convert from json instead."],"tags":["cli","validation","flags","hubble"],"backgroundTag":"invalid-flag-value","analyzedSha":"ac7b90affa4baf0642e6685319d56907b3a73a6d","analyzedAt":"2026-08-31T18:27:15.868Z","schemaVersion":2},"datasetVersion":"2026-08-31T22:30:34.772Z"}