{"record":{"id":"b38e7e47f6641cbd","repo":"weaviate/weaviate","slug":"w-expected-q-to-contain-strings-found-t-v","errorCode":null,"errorMessage":"%w: expected %q to contain strings, found %T: %+v","messagePattern":"%w: expected %q to contain strings, found %T: %\\+v","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/ref2vec-centroid/config/validation.go","lineNumber":44,"sourceCode":"\t\treturn fmt.Errorf(\"%w: must have at least one value in the %q field\",\n\t\t\terrInvalidConfig, referencePropertiesField)\n\t}\n\n\tpropSlice, ok := refProps.([]interface{})\n\tif !ok {\n\t\treturn fmt.Errorf(\"%w: expected array for field %q, got %T\",\n\t\t\terrInvalidConfig, referencePropertiesField, refProps)\n\t}\n\n\tif len(propSlice) == 0 {\n\t\treturn fmt.Errorf(\"%w: must have at least one value in the %q field\",\n\t\t\terrInvalidConfig, referencePropertiesField)\n\t}\n\n\t// all provided property names must be strings\n\tfor _, prop := range propSlice {\n\t\tif _, ok := prop.(string); !ok {\n\t\t\treturn fmt.Errorf(\"%w: expected %q to contain strings, found %T: %+v\",\n\t\t\t\terrInvalidConfig, referencePropertiesField, prop, refProps)\n\t\t}\n\t}\n\n\t_, err := cfg.CalculationMethod()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":26,"sourceCodeEnd":56,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/modules/ref2vec-centroid/config/validation.go#L26-L56","documentation":"Config validation for ref2vec-centroid's referenceProperties array: an individual element of the array is not a string (e.g. a number, object, or boolean was placed in the list). All reference property names must be strings so they can be matched against the class schema; the offending element's Go type and value are included in the error.","triggerScenarios":"Thrown at modules/ref2vec-centroid/config/validation.go:44 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Edit referenceProperties so every entry is a quoted string, e.g. [\"hasArticle\", \"mentions\"]","Remove stray non-string entries such as nested objects or numbers","Re-validate the class configuration after the fix"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"75aa4b6d11f8818305aafd4440b4e32794f7ca04","analyzedAt":"2026-09-04T14:58:20.392Z","contentChangedAt":"2026-09-04T14:58:20.392Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}