diff --git a/src/api/warp.ts b/src/api/warp.ts index d8f800d..656b047 100644 --- a/src/api/warp.ts +++ b/src/api/warp.ts @@ -176,7 +176,6 @@ export async function getContractState({ new ContractStateCacheKey(contractTxId, evaluationOptions, warp, logger), ); } catch (error) { - console.log(error); // throw an eval here so we can properly return correct status code if ( error instanceof Error && @@ -186,8 +185,8 @@ export async function getContractState({ ) { throw new EvaluationError(error.message); } else if ( - (error as any).type && - (error as any).type.includes('TX_NOT_FOUND') + ((error as any).type && (error as any).type.includes('TX_NOT_FOUND')) || + (error as any).includes('TX_INVALID') ) { throw new NotFoundError('Contract not found'); } else if (error instanceof Error && error.message.includes('404')) {