Skip to content

Commit cc3e8d8

Browse files
committed
add missing error check
1 parent c2e2cb6 commit cc3e8d8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/pgengine/transaction.go

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ func (pge *PgEngine) StartTransaction(ctx context.Context, chainID int) (tx pgx.
3939
return
4040
}
4141
err = pgxscan.Get(ctx, tx, &txid, "SELECT txid_current()")
42+
if err != nil {
43+
return
44+
}
4245
_, err = tx.Exec(ctx, `SELECT set_config('pg_timetable.current_chain_id', $1, true)`, strconv.Itoa(chainID))
4346
return
4447
}

0 commit comments

Comments
 (0)