weaviate/weaviate · error
not a bool, but %T
Error message
not a bool, but %T
What it means
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.
Source
Thrown at usecases/objects/validation/properties_validation.go:406
return crefs, nil
default:
return nil, fmt.Errorf("invalid ref type. Needs to be []map, got %T", pv)
}
}
func stringVal(val interface{}) (string, error) {
typed, ok := val.(string)
if !ok {
return "", fmt.Errorf("not a string, but %T", val)
}
return typed, nil
}
func boolVal(val interface{}) (bool, error) {
typed, ok := val.(bool)
if !ok {
return false, fmt.Errorf("not a bool, but %T", val)
}
return typed, nil
}
func dateVal(val interface{}) (time.Time, error) {
if dateStr, ok := val.(string); ok {
if date, err := time.Parse(time.RFC3339, dateStr); err == nil {
return date, nil
}
}
errorInvalidDate := "requires a string with a RFC3339 formatted date, but the given value is '%v'"
return time.Time{}, fmt.Errorf(errorInvalidDate, val)
}
func uuidVal(val interface{}) (uuid.UUID, error) {
if uuidStr, ok := val.(string); ok {View on GitHub (pinned to 75aa4b6d11)
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.
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at usecases/objects/validation/properties_validation.go:406 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/74134081bbaea70f.
Report an issue: GitHub.