Skip to content

Commit b5d1beb

Browse files
Adding more details for mutation error messages with scalar/uid type mismatch (#4317)
* Adding more details for error messages with scalar/uid type mismatch * used %q instead of "%s"
1 parent c3c1a48 commit b5d1beb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

worker/mutation.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,10 @@ func ValidateAndConvert(edge *pb.DirectedEdge, su *pb.SchemaUpdate) error {
349349
return nil
350350

351351
case !schemaType.IsScalar() && storageType.IsScalar():
352-
return errors.Errorf("Input for predicate %s of type uid is scalar", edge.Attr)
352+
return errors.Errorf("Input for predicate %q of type uid is scalar. Edge: %v", edge.Attr, edge)
353353

354354
case schemaType.IsScalar() && !storageType.IsScalar():
355-
return errors.Errorf("Input for predicate %s of type scalar is uid. Edge: %v", edge.Attr, edge)
355+
return errors.Errorf("Input for predicate %q of type scalar is uid. Edge: %v", edge.Attr, edge)
356356

357357
// The suggested storage type matches the schema, OK!
358358
case storageType == schemaType && schemaType != types.DefaultID:

0 commit comments

Comments
 (0)