weaviate/weaviate · error

could not recognize object's properties: %v

Error message

could not recognize object's properties: %v

What it means

The object's 'properties' field is non-nil but not a JSON object: after JSON decoding it must be map[string]interface{}, and the type assertion failed (e.g. it was an array, string, or number). A shape guard on user-supplied input, not a schema error.

Source

Thrown at usecases/objects/validation/properties_validation.go:71

	}

	if vectorWeights != nil {
		res, err := v.validateVectorWeights(vectorWeights)
		if err != nil {
			return fmt.Errorf("vector weights: %w", err)
		}

		vectorWeights = res
	}

	if isp == nil {
		// no properties means nothing to validate
		return nil
	}

	inputSchema, ok := isp.(map[string]interface{})
	if !ok {
		return fmt.Errorf("could not recognize object's properties: %v", isp)
	}
	returnSchema := map[string]interface{}{}

	for propertyKey, propertyValue := range inputSchema {
		if propertyValue == nil {
			continue // nil values are removed and filtered out
		}

		// properties in the class are saved with lower case first letter
		propertyKeyLowerCase := schema.LowercaseFirstLetter(propertyKey)
		property, err := schema.GetPropertyByName(class, propertyKeyLowerCase)
		if err != nil {
			return err
		}
		dataType, err := schema.GetPropertyDataType(class, propertyKeyLowerCase)
		if err != nil {
			return err
		}

View on GitHub (pinned to 75aa4b6d11)

Solutions

  1. Send properties as a JSON object: {"title": ...}, not an array or scalar.
  2. If using a client SDK, pass a map/dict for properties rather than a serialized string.
  3. Check for double-encoded JSON (a string containing JSON) in the request body.
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at usecases/objects/validation/properties_validation.go:71 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/4c750213ae6aa014. Report an issue: GitHub.