cayleygraph/cayley · error
Expected %#v and %#v to have the same length
Error message
Expected %#v and %#v to have the same length
What it means
Error "Expected %#v and %#v to have the same length" thrown in cayleygraph/cayley.
Source
Thrown at query/linkedql/steps/jsonld_util.go:52
source = unwrapValue(unwrapSingle(source))
target = unwrapValue(unwrapSingle(target))
switch s := source.(type) {
case string:
t, ok := target.(string)
if !ok {
return fmt.Errorf("Expected %v to be a string but instead received %T", target, target)
}
if s != t {
return fmt.Errorf("Expected \"%v\" but instead received \"%v\"", s, t)
}
return nil
case ldArray:
t, ok := target.(ldArray)
if !ok {
return fmt.Errorf("Expected multiple values but instead received the single value: %#v", target)
}
if len(s) != len(t) {
return fmt.Errorf("Expected %#v and %#v to have the same length", s, t)
}
items:
for _, i := range s {
for _, tI := range t {
if isomorphic(i, tI) == nil {
continue items
}
}
return fmt.Errorf("No matching values for the item %#v in %#v", i, t)
}
return nil
case ldMap:
t, ok := target.(ldMap)
if !ok {
return fmt.Errorf("Expected %#v to be a map or a slice with a single map but instead received %T", target, target)
}
for k, v := range s {
tV, _ := t[k]View on GitHub (pinned to 81dcd7d73e)
When it happens
Trigger: Thrown at query/linkedql/steps/jsonld_util.go:52 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of cayleygraph/cayley@81dcd7d73e (2026-09-06).
Data as JSON: /api/errors/bcd61e554522d488.
Report an issue: GitHub.