Skip to content

Commit

Permalink
Do not loose original error in tx
Browse files Browse the repository at this point in the history
  • Loading branch information
cristaloleg committed Jun 25, 2022
1 parent 8ede715 commit 51ed91c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dbump.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func (m *mig) execStepSafely(ctx context.Context, step step) (err error) {
defer func() {
if err != nil {
if errRollback := m.Migrator.Rollback(ctx); errRollback != nil {
err = fmt.Errorf("rollback tx: %w", errRollback)
err = fmt.Errorf("(rollback tx: %v): %w", errRollback, err)
}
}
}()
Expand Down

0 comments on commit 51ed91c

Please sign in to comment.