Handle errors

This commit is contained in:
Sung 2025-10-12 16:01:50 -07:00
commit 651c1eefc7
2 changed files with 6 additions and 2 deletions

View file

@ -1060,7 +1060,9 @@ func newRun(ctx context.DnoteCtx) infra.RunEFunc {
}
}
tx.Commit()
if err := tx.Commit(); err != nil {
return errors.Wrap(err, "committing transaction")
}
log.Success("success\n")

View file

@ -291,7 +291,9 @@ func InitSystem(ctx context.DnoteCtx) error {
return errors.Wrapf(err, "initializing system config for %s", consts.SystemLastSyncAt)
}
tx.Commit()
if err := tx.Commit(); err != nil {
return errors.Wrap(err, "committing transaction")
}
return nil
}