{"record":{"id":"74134081bbaea70f","repo":"weaviate/weaviate","slug":"not-a-bool-but-t","errorCode":null,"errorMessage":"not a bool, but %T","messagePattern":"not a bool, but %T","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"usecases/objects/validation/properties_validation.go","lineNumber":406,"sourceCode":"\t\treturn crefs, nil\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"invalid ref type. Needs to be []map, got %T\", pv)\n\t}\n}\n\nfunc stringVal(val interface{}) (string, error) {\n\ttyped, ok := val.(string)\n\tif !ok {\n\t\treturn \"\", fmt.Errorf(\"not a string, but %T\", val)\n\t}\n\n\treturn typed, nil\n}\n\nfunc boolVal(val interface{}) (bool, error) {\n\ttyped, ok := val.(bool)\n\tif !ok {\n\t\treturn false, fmt.Errorf(\"not a bool, but %T\", val)\n\t}\n\n\treturn typed, nil\n}\n\nfunc dateVal(val interface{}) (time.Time, error) {\n\tif dateStr, ok := val.(string); ok {\n\t\tif date, err := time.Parse(time.RFC3339, dateStr); err == nil {\n\t\t\treturn date, nil\n\t\t}\n\t}\n\n\terrorInvalidDate := \"requires a string with a RFC3339 formatted date, but the given value is '%v'\"\n\treturn time.Time{}, fmt.Errorf(errorInvalidDate, val)\n}\n\nfunc uuidVal(val interface{}) (uuid.UUID, error) {\n\tif uuidStr, ok := val.(string); ok {","sourceCodeStart":388,"sourceCodeEnd":424,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/usecases/objects/validation/properties_validation.go#L388-L424","documentation":"Type-assertion failure in boolVal: the incoming property value could not be asserted to bool, so the actual Go type is reported. Fires when a boolean property receives a string, number, or null in the object payload.","triggerScenarios":"Thrown at usecases/objects/validation/properties_validation.go:406 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use bare JSON true/false.","Convert truthy strings/numbers to booleans client-side.","Fix the schema dataType if the source data isn't boolean."],"exampleFix":null,"handlingStrategy":"type-guard","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"}