{"record":{"id":"8a0352faa83e5486","repo":"thanos-io/thanos","slug":"unknown-match-type","errorCode":null,"errorMessage":"unknown match type","messagePattern":"unknown match type","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/store/storepb/custom.go","lineNumber":476,"sourceCode":"func (m *LabelMatcher) GetName() string {\n\treturn m.Name\n}\n\nfunc (m *LabelMatcher) GetValue() string {\n\treturn m.Value\n}\n\nfunc (x LabelMatcher_Type) PromString() string {\n\ttypeToStr := map[LabelMatcher_Type]string{\n\t\tLabelMatcher_EQ:  \"=\",\n\t\tLabelMatcher_NEQ: \"!=\",\n\t\tLabelMatcher_RE:  \"=~\",\n\t\tLabelMatcher_NRE: \"!~\",\n\t}\n\tif str, ok := typeToStr[x]; ok {\n\t\treturn str\n\t}\n\tpanic(\"unknown match type\")\n}\n\n// PromLabels return Prometheus labels.Labels without extra allocation.\nfunc (m *Series) PromLabels() labels.Labels {\n\treturn labelpb.ZLabelsToPromLabels(m.Labels)\n}\n\n// Deprecated.\n// TODO(bwplotka): Remove this once Cortex dep will stop using it.\ntype Label = labelpb.ZLabel\n\n// Deprecated.\n// TODO(bwplotka): Remove this in next PR. Done to reduce diff only.\ntype LabelSet = labelpb.ZLabelSet\n\n// Deprecated.\n// TODO(bwplotka): Remove this once Cortex dep will stop using it.\nfunc CompareLabels(a, b []Label) int {","sourceCodeStart":458,"sourceCodeEnd":494,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/store/storepb/custom.go#L458-L494","documentation":"A guard panic in LabelMatcher_Type.PromString: the matcher type enum value is not one of EQ/NEQ/RE/NRE, so no '='/'!='/'=~'/'!~' operator string exists. Only reachable with an out-of-range enum value (corrupted proto or incompatible version), as the proto enum cannot normally hold another value.","triggerScenarios":"Thrown at pkg/store/storepb/custom.go:476 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Validate matcher type range before rendering to string","Check for corrupted or version-mismatched storepb data feeding PromString"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35b8b991177def87ed52dcf10f9b6d87f07282c8","analyzedAt":"2026-09-07T01:49:59.689Z","contentChangedAt":"2026-09-07T01:49:59.689Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}