From a97a281e73824572f0e8f8912c38af362f0f30e0 Mon Sep 17 00:00:00 2001 From: dtfiedler Date: Mon, 20 Nov 2023 09:07:18 -0600 Subject: [PATCH] chore(error): return error message if it exists --- src/api/warp.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/api/warp.ts b/src/api/warp.ts index c0fc3e3..98afeae 100644 --- a/src/api/warp.ts +++ b/src/api/warp.ts @@ -121,7 +121,8 @@ class ContractReadInteractionCacheKey { const contractReadInteractionCache: ReadThroughPromiseCache< ContractReadInteractionCacheKey, { - result: any; + result: unknown; + input: unknown; evaluationOptions: Partial; } > = new ReadThroughPromiseCache({ @@ -382,7 +383,7 @@ export async function readThroughToContractReadInteraction( const { result, error, errorMessage } = readInteractionResult; - if (error) { + if (error || errorMessage) { logger?.error('Read interaction failed!', { contractTxId, cacheKey: cacheKey.toString(),