thanos-io/thanos · error
failed to unqote , in order to unmarshal as…
Error message
failed to unqote %v, in order to unmarshal as 'partial_response_strategy'. Possible values are %s
What it means
strconv.Unquote failed on the raw JSON bytes for the partial_response_strategy field, meaning the entry is not a valid quoted Go/JSON string (e.g. stray quotes, wrong quoting, control characters). The input at fault is the serialized rule/flag value being unmarshalled, and the message lists the accepted values.
Solutions
- Fix the JSON/YAML source so the field is a properly quoted string
- Use one of the documented values: abort or partial
- If editing by hand, validate the file with a JSON linter before reloading
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pkg/store/storepb/custom.go:343 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of thanos-io/thanos@35b8b99117 (2026-09-07).
Data as JSON: /api/errors/2a8bec59a8fe6708.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/store/storepb/custom.go:343
return 1
}
if m == nil {
return -1
}
if m.Type < b.Type {
return 1
}
if m.Type > b.Type {
return -1
}
return bytes.Compare(m.Data, b.Data)
}
func (x *PartialResponseStrategy) UnmarshalJSON(entry []byte) error {
fieldStr, err := strconv.Unquote(string(entry))
if err != nil {
return errors.Wrapf(
err,
"failed to unqote %v, in order to unmarshal as 'partial_response_strategy'. Possible values are %s", string(entry), strings.Join(PartialResponseStrategyValues, ","),
)
}
if fieldStr == "" {
// NOTE: For Rule default is abort as this is recommended for alerting.
*x = PartialResponseStrategy_ABORT
return nil
}
strategy, ok := PartialResponseStrategy_value[strings.ToUpper(fieldStr)]
if !ok {
return errors.Errorf(
"failed to unmarshal %v as 'partial_response_strategy'. Possible values are %s",
string(entry),
strings.Join(PartialResponseStrategyValues, ","),
)View on GitHub (pinned to 35b8b99117)