weaviate/weaviate · error
no such class with name '%s'
Error message
no such class with name '%s'
What it means
Same not-found condition in GetClassByName as the verbose variant, but formatted with just the class name. This instance is the loop-exhaustion return (or nil-schema return) using the ErrorNoSuchClass template with a single verb — it is the canonical 'class does not exist' sentinel for this legacy helper.
Source
Thrown at entities/schema/backward_compat.go:39
type PropertyInterface interface {
GetName() string
GetNestedProperties() []*models.NestedProperty
}
// GetClassByName returns the class by its name.
func GetClassByName(s *models.Schema, className string) (*models.Class, error) {
if s == nil {
return nil, fmt.Errorf(ErrorNoSuchClass, className)
}
for _, class := range s.Classes {
// Check if the name of the class is the given name, that's the class we need
if class.Class == className {
return class, nil
}
}
return nil, fmt.Errorf(ErrorNoSuchClass, className)
}
// GetPropertyByName returns a frst-order property by its name.
// If propName is a name of the nested property, then this property is returned.
// It is not possible to retrieve deeply nested properties using the dot-notation.
func GetPropertyByName(c *models.Class, propName string) (*models.Property, error) {
// a nested property is addressed by its first dot-notation segment
root, _, _ := strings.Cut(propName, ".")
for _, prop := range c.Properties {
if prop.Name == root {
return prop, nil
}
}
return nil, fmt.Errorf(ErrorNoSuchProperty, propName, c.Class)
}
// GetPropertyDataType checks whether the given string is a valid data type
func GetPropertyDataType(class *models.Class, propertyName string) (*DataType, error) {View on GitHub (pinned to 75aa4b6d11)
Solutions
- Verify the class name against the actual schema and retry
- Create the missing class first
- If the schema is expected to exist, check that it was passed in and loaded correctly (nil schema also triggers this)
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at entities/schema/backward_compat.go:39 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/5f447121f7e4a308.
Report an issue: GitHub.