diff --git a/server/pipeline_group.go b/server/pipeline_group.go index 45d4417518..737db15ad8 100644 --- a/server/pipeline_group.go +++ b/server/pipeline_group.go @@ -110,9 +110,9 @@ func (p *pipeline) groupCreate(logger zap.Logger, session *session, envelope *En if err != nil { logger.Error("Could not create group", zap.Error(err)) if tx != nil { - err = tx.Rollback() - if err != nil { - logger.Error("Could not rollback transaction", zap.Error(err)) + txErr := tx.Rollback() + if txErr != nil { + logger.Error("Could not rollback transaction", zap.Error(txErr)) } } if strings.HasSuffix(err.Error(), "violates unique constraint \"groups_name_key\"") {