diff --git a/backend/src/api/blocks.ts b/backend/src/api/blocks.ts index 3e4d3466e..7f9581ea9 100644 --- a/backend/src/api/blocks.ts +++ b/backend/src/api/blocks.ts @@ -70,13 +70,16 @@ class Blocks { if (mempool[txIds[i]]) { transactions.push(mempool[txIds[i]]); transactionsFound++; - } else if (config.MEMPOOL.BACKEND === 'esplora' || memPool.isInSync()) { + } else if (config.MEMPOOL.BACKEND === 'esplora' || memPool.isInSync() || i === 0) { logger.debug(`Fetching block tx ${i} of ${txIds.length}`); try { const tx = await transactionUtils.$getTransactionExtended(txIds[i]); transactions.push(tx); } catch (e) { logger.debug('Error fetching block tx: ' + e.message || e); + if (i === 0) { + throw new Error('Failed to fetch Coinbase transaction: ' + txIds[i]); + } } } }