Skip to content

Commit

Permalink
Merge branch 'queue_error_handling' into 'dev'
Browse files Browse the repository at this point in the history
Fix warn logs for queue errors

Closes #262

See merge request ergo/rosen-bridge/watcher!323
  • Loading branch information
vorujack committed Jan 6, 2025
2 parents 62f4a00 + 4059fc9 commit 11c104b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .changeset/polite-grapes-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
11 changes: 8 additions & 3 deletions src/ergo/transaction/queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,14 @@ export class Queue {
try {
await this.processTx(tx, currentHeight);
} catch (e) {
logger.warn(
`An error occurred while processing tx [${tx.txId}] with type ${tx.type}: ${e.message} - ${e.stack}`
);
if (e instanceof Error)
logger.warn(
`An error occurred while processing tx [${tx.txId}] with type ${tx.type}: ${e.message} - ${e.stack}`
);
else
logger.warn(
`An unknown problem occurred while processing tx [${tx.txId}] with type ${tx.type}: ${e}`
);
}
}
logger.info('Transactions check job is done', { count: txs.length });
Expand Down

0 comments on commit 11c104b

Please sign in to comment.