Add error message for func saveStruct
This commit is contained in:
parent
b31ca726e2
commit
218e470106
2
save.go
2
save.go
|
@ -236,7 +236,7 @@ func saveStruct(
|
||||||
if err := SaveRow(ctx, db, row); err != nil {
|
if err := SaveRow(ctx, db, row); err != nil {
|
||||||
span.RecordError(err)
|
span.RecordError(err)
|
||||||
span.SetStatus(codes.Error, err.Error())
|
span.SetStatus(codes.Error, err.Error())
|
||||||
return err
|
return errors.WithMessagef(err, "Can not execute saveStruct. Got error from SaveRow. ownerId: %d.", ownerId)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue