Skip to content

Commit

Permalink
return context when new transaction returns error (#1033)
Browse files Browse the repository at this point in the history
  • Loading branch information
lovromazgon committed May 11, 2023
1 parent 0697903 commit b26d260
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/foundation/database/postgres/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (d *DB) NewTransaction(ctx context.Context, update bool) (database.Transact

pgxTx, err := d.pool.BeginTx(ctx, pgx.TxOptions{AccessMode: accessMode})
if err != nil {
return nil, nil, cerrors.Errorf("could not begin transaction: %w", err)
return nil, ctx, cerrors.Errorf("could not begin transaction: %w", err)
}

txn := &Txn{
Expand Down

0 comments on commit b26d260

Please sign in to comment.