File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change
1
+ import { StaticJsonRpcBatchProvider } from "@thirdweb-dev/sdk" ;
1
2
import { getBlockForIndexing } from "../../db/chainIndexers/getChainIndexer" ;
2
3
import { upsertChainIndexer } from "../../db/chainIndexers/upsertChainIndexer" ;
3
4
import { prisma } from "../../db/client" ;
@@ -48,7 +49,14 @@ export const createChainIndexerTask = async (args: {
48
49
const block = await provider . getBlockWithTransactions ( toBlock ) ;
49
50
50
51
if ( ! block ) {
51
- throw new Error ( `Failed to get block: ${ toBlock } ` ) ;
52
+ logger ( {
53
+ service : "worker" ,
54
+ level : "warn" ,
55
+ message : `Block data not available: ${ toBlock } on chain: ${ chainId } , url: ${
56
+ ( provider as StaticJsonRpcBatchProvider ) . connection . url
57
+ } . Will retry in the next cycle.`,
58
+ } ) ;
59
+ return ;
52
60
}
53
61
54
62
// Get contract addresses to filter event logs and transaction receipts by.
You can’t perform that action at this time.
0 commit comments