Skip to content

Commit

Permalink
Capture error on export queue.
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed Oct 1, 2023
1 parent c778cb1 commit e1c5495
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/scripts/export/trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e1c5495

Please sign in to comment.