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

Commit

Permalink
chore(logs): add logs when read interaction fails
Browse files Browse the repository at this point in the history
  • Loading branch information
dtfiedler committed Nov 14, 2023
1 parent dc426df commit 7fb6966
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/api/warp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,11 @@ export async function readThroughToContractReadInteraction(

// we shouldn't return read interactions that don't have a result
if (!result) {
logger?.error('Read interaction did not return a result!', {
contractTxId,
cacheKey: cacheKey.toString(),
input,
});
throw new BadRequestError(
`Invalid read interaction for contract ${contractTxId}.`,
);
Expand Down

0 comments on commit 7fb6966

Please sign in to comment.