Merge pull request #42 from mihaelabalutoiu/fix-error-wrap

Fixed error wrap
This commit is contained in:
Gabriel 2022-10-18 10:17:07 +03:00 committed by GitHub
commit 19e31cc922
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -125,7 +125,7 @@ func (s *sqlDatabase) UpdateRepository(ctx context.Context, repoID string, param
q := s.conn.Save(&repo)
if q.Error != nil {
return params.Repository{}, errors.Wrap(err, "saving repo")
return params.Repository{}, errors.Wrap(q.Error, "saving repo")
}
newParams := s.sqlToCommonRepository(repo)
@ -196,7 +196,7 @@ func (s *sqlDatabase) CreateRepositoryPool(ctx context.Context, repoId string, p
q := s.conn.Create(&newPool)
if q.Error != nil {
return params.Pool{}, errors.Wrap(err, "adding pool")
return params.Pool{}, errors.Wrap(q.Error, "adding pool")
}
for _, tt := range tags {