From 3853b3500ac92750b493caa2be042e9b609011d7 Mon Sep 17 00:00:00 2001 From: Alex Gherghisan Date: Thu, 28 Sep 2023 21:25:49 +0100 Subject: [PATCH] fix: JSON-RPC client parsing new errors --- .../foundation/src/json-rpc/client/json_rpc_client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yarn-project/foundation/src/json-rpc/client/json_rpc_client.ts b/yarn-project/foundation/src/json-rpc/client/json_rpc_client.ts index 39ddefae1a1..c8f118bdb6c 100644 --- a/yarn-project/foundation/src/json-rpc/client/json_rpc_client.ts +++ b/yarn-project/foundation/src/json-rpc/client/json_rpc_client.ts @@ -56,9 +56,9 @@ export async function defaultFetch( } if (!resp.ok) { if (noRetry) { - throw new NoRetryError(responseJson.error); + throw new NoRetryError(responseJson.error.message); } else { - throw new Error(responseJson.error); + throw new Error(responseJson.error.message); } }