diff --git a/internal/datastore/postgres/revisions.go b/internal/datastore/postgres/revisions.go index 000551e124..72506ecd68 100644 --- a/internal/datastore/postgres/revisions.go +++ b/internal/datastore/postgres/revisions.go @@ -239,7 +239,10 @@ func createNewTransaction(ctx context.Context, tx pgx.Tx) (newXID xid8, newSnaps ctx, span := tracer.Start(ctx, "createNewTransaction") defer span.End() - err = tx.QueryRow(ctx, createTxn).Scan(&newXID, &newSnapshot) + cterr := tx.QueryRow(ctx, createTxn).Scan(&newXID, &newSnapshot) + if cterr != nil { + err = fmt.Errorf("error when trying to create a new transaction: %w", cterr) + } return }