From 715e3cbd820ff68ab4e3cd925ae27bb03ef191df Mon Sep 17 00:00:00 2001 From: Kobe Date: Mon, 21 Oct 2024 16:46:17 +0200 Subject: [PATCH] fix: better error handling for block hash expired --- packages/mrgn-utils/src/errors.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mrgn-utils/src/errors.ts b/packages/mrgn-utils/src/errors.ts index 2e50eef07..e30e4cebd 100644 --- a/packages/mrgn-utils/src/errors.ts +++ b/packages/mrgn-utils/src/errors.ts @@ -328,7 +328,7 @@ export const handleError = ( } if ( - error.messgae?.toLowerCase()?.includes("block height exceeded") || + error.message?.toLowerCase()?.includes("block height exceeded") || error.message === "BlockhashNotFound" || // Exact match error.message?.toLowerCase()?.includes("blockhashnotfound") || // Contains 'BlockhashNotFound' error.message?.includes('"BlockhashNotFound"') || // Contains '"BlockhashNotFound"'