mirror of
https://github.com/dnote/dnote
synced 2026-03-14 22:45:50 +01:00
Handle errors
This commit is contained in:
parent
346bd9afb1
commit
651c1eefc7
2 changed files with 6 additions and 2 deletions
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue