{"record":{"id":"722054d5beda7a2d","repo":"grafana/k6","slug":"invalid-summary-mode","errorCode":null,"errorMessage":"invalid summary mode","messagePattern":"invalid summary mode","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/lib/summary/summary.go","lineNumber":22,"sourceCode":"\t\"errors\"\n\t\"time\"\n\n\t\"go.k6.io/k6/v2/metrics\"\n)\n\n// A Mode specifies the mode of the Summary,\n// which defines how the end-of-test summary will be rendered.\ntype Mode int\n\n// Possible values for SummaryMode.\nconst (\n\tModeCompact  = Mode(iota) // Compact mode that only displays the total results.\n\tModeFull                  // Extended mode that displays total and partial results.\n\tModeDisabled              // Disabled. Can be used with --summary-mode=disabled.\n)\n\n// ErrInvalidSummaryMode indicates the serialized summary mode is invalid.\nvar ErrInvalidSummaryMode = errors.New(\"invalid summary mode\")\n\nconst (\n\tcompactString  = \"compact\"\n\tfullString     = \"full\"\n\tdisabledString = \"disabled\"\n)\n\n// MarshalJSON serializes a Mode as a human-readable string.\nfunc (m Mode) MarshalJSON() ([]byte, error) {\n\ttxt, err := m.MarshalText()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn []byte(`\"` + string(txt) + `\"`), nil\n}\n\n// MarshalText serializes a Mode as a human-readable string.\nfunc (m Mode) MarshalText() ([]byte, error) {","sourceCodeStart":4,"sourceCodeEnd":40,"githubUrl":"https://github.com/grafana/k6/blob/93accf6570dcd306ca5e99cc44c393ee3797761b/internal/lib/summary/summary.go#L4-L40","documentation":"Error \"invalid summary mode\" thrown in grafana/k6.","triggerScenarios":"Thrown at internal/lib/summary/summary.go:22 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"93accf6570dcd306ca5e99cc44c393ee3797761b","analyzedAt":"2026-08-15T21:23:27.118Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}