From e1c549529c1aad74f6d37d419ea8277c84352f80 Mon Sep 17 00:00:00 2001 From: Noah Saso Date: Sun, 1 Oct 2023 00:12:27 -0700 Subject: [PATCH] Capture error on export queue. --- src/scripts/export/trace.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/scripts/export/trace.ts b/src/scripts/export/trace.ts index 2905867c..bacc96b9 100644 --- a/src/scripts/export/trace.ts +++ b/src/scripts/export/trace.ts @@ -90,6 +90,17 @@ const trace = async () => { const exportQueue = getBullQueue<{ data: ExportQueueData[] }>( EXPORT_QUEUE_NAME ) + exportQueue.on('error', async (err) => { + console.error('Queue errored', err) + + Sentry.captureException(err, { + tags: { + type: 'export-queue-error', + script: 'export:trace', + chainId: (await State.getSingleton())?.chainId ?? 'unknown', + }, + }) + }) // Create CosmWasm client that batches requests. const cosmWasmClient = await getCosmWasmClient(config.rpc)