From 7528e4ada8dd2ccfc90d7b97dd8e2c21645bfe87 Mon Sep 17 00:00:00 2001 From: HFazelinia Date: Sat, 23 Nov 2024 07:57:21 +0000 Subject: [PATCH] rethrow any errors while verifying events --- .changeset/neat-turkeys-cry.md | 5 +++++ packages/abstract-chain/lib/AbstractChain.ts | 9 +-------- 2 files changed, 6 insertions(+), 8 deletions(-) create mode 100644 .changeset/neat-turkeys-cry.md diff --git a/.changeset/neat-turkeys-cry.md b/.changeset/neat-turkeys-cry.md new file mode 100644 index 0000000..79fc94f --- /dev/null +++ b/.changeset/neat-turkeys-cry.md @@ -0,0 +1,5 @@ +--- +'@rosen-chains/abstract-chain': patch +--- + +Rethrow any unexpected errors while verifying events diff --git a/packages/abstract-chain/lib/AbstractChain.ts b/packages/abstract-chain/lib/AbstractChain.ts index 140cd9a..c1e39dd 100644 --- a/packages/abstract-chain/lib/AbstractChain.ts +++ b/packages/abstract-chain/lib/AbstractChain.ts @@ -253,15 +253,8 @@ abstract class AbstractChain { `Event [${eventId}] is not valid, lock tx [${event.sourceTxId}] is not available in network` ); return false; - } else if ( - e instanceof FailedError || - e instanceof NetworkError || - e instanceof UnexpectedApiError - ) { - throw Error(`Skipping event [${eventId}] validation: ${e}`); } else { - this.logger.warn(`Event [${eventId}] validation failed: ${e}`); - return false; + throw Error(`Skipping event [${eventId}] validation: ${e}`); } } };