diff --git a/src/connection.ts b/src/connection.ts index 1f97a19322dd..de07c83a68e2 100644 --- a/src/connection.ts +++ b/src/connection.ts @@ -6252,13 +6252,13 @@ export class Connection { ] = subscription.callbacks; await this._updateSubscriptions(); } catch (e) { - if (e instanceof Error) { - console.error( - `${method} error for argument`, + console.error( + `Received ${e instanceof Error ? '' : 'JSON-RPC '}error calling \`${method}\``, + { args, - e.message, - ); - } + error: e, + }, + ); if (!isCurrentConnectionStillActive()) { return; }