Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
chore(error): return error message if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
dtfiedler committed Nov 20, 2023
1 parent 18a1d43 commit a97a281
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/api/warp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ class ContractReadInteractionCacheKey {
const contractReadInteractionCache: ReadThroughPromiseCache<
ContractReadInteractionCacheKey,
{
result: any;
result: unknown;
input: unknown;
evaluationOptions: Partial<EvaluationOptions>;
}
> = new ReadThroughPromiseCache({
Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit a97a281

Please sign in to comment.