Skip to content

Commit d8d246b

Browse files
committed
chore: trace error line more specific
1 parent 72e968e commit d8d246b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/collections/infra/mysql_repo.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,13 @@ func (r mysqlRepo) updateOrCreateSubjectCollection(
153153

154154
T := r.q.SubjectCollection
155155
if created {
156-
err = T.WithContext(ctx).Create(obj)
156+
err = errgo.Trace(T.WithContext(ctx).Create(obj))
157157
} else {
158-
err = T.WithContext(ctx).Save(obj)
158+
err = errgo.Trace(T.WithContext(ctx).Save(obj))
159159
}
160160

161161
if err != nil {
162-
return errgo.Trace(err)
162+
return err
163163
}
164164

165165
r.updateSubject(ctx, subject.ID)

0 commit comments

Comments
 (0)