Skip to content

Commit e345937

Browse files
fix: log JSON-RPC subscription errors to the console (#3392)
* Fix skip log error from message * Collapse error into a single unified one --------- Co-authored-by: Steven Luscher <[email protected]>
1 parent 0c695dc commit e345937

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/connection.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6252,13 +6252,13 @@ export class Connection {
62526252
] = subscription.callbacks;
62536253
await this._updateSubscriptions();
62546254
} catch (e) {
6255-
if (e instanceof Error) {
6256-
console.error(
6257-
`${method} error for argument`,
6255+
console.error(
6256+
`Received ${e instanceof Error ? '' : 'JSON-RPC '}error calling \`${method}\``,
6257+
{
62586258
args,
6259-
e.message,
6260-
);
6261-
}
6259+
error: e,
6260+
},
6261+
);
62626262
if (!isCurrentConnectionStillActive()) {
62636263
return;
62646264
}

0 commit comments

Comments
 (0)