From 7ccf0aa4bfbb3cf7e0e5d18b7f146ab20e8386bd Mon Sep 17 00:00:00 2001 From: Verbickiy_A Date: Sat, 2 Nov 2024 19:48:00 +0400 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20[object=20Object]=20error?= =?UTF-8?q?=20message=20fixed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed error message, that's thrown when rpc throws unknown error --- src/lib/logs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/logs.ts b/src/lib/logs.ts index 94eaea1..72ae7dd 100644 --- a/src/lib/logs.ts +++ b/src/lib/logs.ts @@ -31,7 +31,7 @@ export const getErrorFromRPCResponse = ( const errorKeys = Object.keys(error); if (errorKeys.length === 1) { if (errorKeys[0] !== "InstructionError") { - throw new Error(`Unknown RPC error: ${error}`); + throw new Error(`Unknown RPC error: ${JSON.stringify(error)}`); } // @ts-ignore due to missing typing information mentioned above. const instructionError = error["InstructionError"];