Skip to content

Commit

Permalink
rethrow any errors while verifying events
Browse files Browse the repository at this point in the history
  • Loading branch information
RaaCT0R committed Nov 23, 2024
1 parent 817d526 commit 7528e4a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/neat-turkeys-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rosen-chains/abstract-chain': patch
---

Rethrow any unexpected errors while verifying events
9 changes: 1 addition & 8 deletions packages/abstract-chain/lib/AbstractChain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,15 +253,8 @@ abstract class AbstractChain<TxType> {
`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}`);
}
}
};
Expand Down

0 comments on commit 7528e4a

Please sign in to comment.