Skip to content

Commit e3981d0

Browse files
committed
don't log/capture TX errors if ignored
1 parent 2622db4 commit e3981d0

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/scripts/listener.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ import { Block, State, loadDb } from '@/db'
99
import { getExtractors } from '@/listener'
1010
import { ExtractQueue } from '@/queues/queues'
1111
import { setupMeilisearch } from '@/search'
12-
import { BlockIterator, WasmCodeService } from '@/services'
12+
import {
13+
BlockIterator,
14+
BlockIteratorErrorType,
15+
WasmCodeService,
16+
} from '@/services'
1317
import { DbType, ExtractableTxInput, ExtractorEnv } from '@/types'
1418
import { AutoCosmWasmClient } from '@/utils'
1519

@@ -322,6 +326,14 @@ const main = async () => {
322326
}
323327
},
324328
onError: (error) => {
329+
// Don't log/capture TX errors if we're ignoring them.
330+
if (
331+
config.ignoreListenerTxErrors &&
332+
error.type === BlockIteratorErrorType.Tx
333+
) {
334+
return
335+
}
336+
325337
console.error(
326338
`[${new Date().toISOString()}] Listener error for ${error.type} (${
327339
error.blockHeight

0 commit comments

Comments
 (0)