Skip to content

Commit b00dbb2

Browse files
committed
fix: remove unnecessary error throwing in dataloaders
1 parent e67c392 commit b00dbb2

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

indexer/src/kadena-server/repository/infra/repository/block-db-repository.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -519,10 +519,6 @@ export default class BlockDbRepository implements BlockRepository {
519519
[eventIds],
520520
);
521521

522-
if (blockRows.length !== eventIds.length) {
523-
throw new Error('There was an issue fetching blocks for event IDs.');
524-
}
525-
526522
const blockMap = blockRows.reduce(
527523
(acum, row) => ({
528524
...acum,
@@ -568,10 +564,6 @@ export default class BlockDbRepository implements BlockRepository {
568564
[transactionIds],
569565
);
570566

571-
if (blockRows.length !== transactionIds.length) {
572-
throw new Error('There was an issue fetching blocks for transaction IDs.');
573-
}
574-
575567
const blockMap = blockRows.reduce(
576568
(acum, row) => ({
577569
...acum,
@@ -615,10 +607,6 @@ export default class BlockDbRepository implements BlockRepository {
615607
[hashes],
616608
);
617609

618-
if (blockRows.length !== hashes.length) {
619-
throw new Error('There was an issue fetching blocks for transaction IDs.');
620-
}
621-
622610
const blockMap = blockRows.reduce(
623611
(acum, row) => ({
624612
...acum,

indexer/src/kadena-server/repository/infra/repository/transaction-db-repository.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -612,10 +612,6 @@ export default class TransactionDbRepository implements TransactionRepository {
612612
[eventIds],
613613
);
614614

615-
if (rows.length !== eventIds.length) {
616-
throw new Error('There was an issue fetching blocks for event IDs.');
617-
}
618-
619615
const transactionMap = rows.reduce(
620616
(acum, row) => ({
621617
...acum,

0 commit comments

Comments
 (0)