{"record":{"id":"10dbaff2862c4686","repo":"thanos-io/thanos","slug":"failed-to-unmarshal-v-as-partial-response-strate","errorCode":null,"errorMessage":"failed to unmarshal %v as 'partial_response_strategy'. Possible values are %s","messagePattern":"failed to unmarshal (.+?) as 'partial_response_strategy'\\. Possible values are (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/store/storepb/custom.go","lineNumber":357,"sourceCode":"\nfunc (x *PartialResponseStrategy) UnmarshalJSON(entry []byte) error {\n\tfieldStr, err := strconv.Unquote(string(entry))\n\tif err != nil {\n\t\treturn errors.Wrapf(\n\t\t\terr,\n\t\t\t\"failed to unqote %v, in order to unmarshal as 'partial_response_strategy'. Possible values are %s\", string(entry), strings.Join(PartialResponseStrategyValues, \",\"),\n\t\t)\n\t}\n\n\tif fieldStr == \"\" {\n\t\t// NOTE: For Rule default is abort as this is recommended for alerting.\n\t\t*x = PartialResponseStrategy_ABORT\n\t\treturn nil\n\t}\n\n\tstrategy, ok := PartialResponseStrategy_value[strings.ToUpper(fieldStr)]\n\tif !ok {\n\t\treturn errors.Errorf(\n\t\t\t\"failed to unmarshal %v as 'partial_response_strategy'. Possible values are %s\",\n\t\t\tstring(entry),\n\t\t\tstrings.Join(PartialResponseStrategyValues, \",\"),\n\t\t)\n\t}\n\t*x = PartialResponseStrategy(strategy)\n\treturn nil\n}\n\nfunc (x *PartialResponseStrategy) MarshalJSON() ([]byte, error) {\n\treturn []byte(strconv.Quote(x.String())), nil\n}\n\n// PromMatchersToMatchers returns proto matchers from Prometheus matchers.\n// NOTE: It allocates memory.\nfunc PromMatchersToMatchers(ms ...*labels.Matcher) ([]LabelMatcher, error) {\n\tres := make([]LabelMatcher, 0, len(ms))\n\tfor _, m := range ms {","sourceCodeStart":339,"sourceCodeEnd":375,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/store/storepb/custom.go#L339-L375","documentation":"The unquoted partial_response_strategy string (uppercased) has no entry in the PartialResponseStrategy_value enum map, i.e. it is not 'abort' or 'partial'. The input at fault is the strategy string itself; the error lists all valid values so the config can be corrected. Note that an empty string is accepted and defaults to ABORT before this check.","triggerScenarios":"Thrown at pkg/store/storepb/custom.go:357 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set partial_response_strategy to 'abort' or 'partial' (case-insensitive)","Omit the field to fall back to the default (abort)"],"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"}