From a2f996dde215a77896e62b0db902d585e503b5cf Mon Sep 17 00:00:00 2001 From: Pavel Date: Wed, 7 Sep 2022 12:55:23 +0300 Subject: [PATCH] Fix issue when undefined data in AVM client caused FJS to fail (#313) --- avm/client/src/avmHelpers.ts | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/avm/client/src/avmHelpers.ts b/avm/client/src/avmHelpers.ts index 87070f9a..a68b2649 100644 --- a/avm/client/src/avmHelpers.ts +++ b/avm/client/src/avmHelpers.ts @@ -154,14 +154,7 @@ export async function callAvm( data: Uint8Array, callResults: CallResultsArray, ): Promise { - try { - const avmArg = serializeAvmArgs(runParams, air, prevData, data, callResults); - const rawResult = await fn(avmArg); - return deserializeAvmResult(rawResult); - } catch (e) { - return { - retCode: -1, - errorMessage: 'marine-js call failed, ' + e, - } as any; - } + const avmArg = serializeAvmArgs(runParams, air, prevData, data, callResults); + const rawResult = await fn(avmArg); + return deserializeAvmResult(rawResult); }