diff --git a/src/transports/WebSocketTransport.ts b/src/transports/WebSocketTransport.ts index 6f8b34c..f9f9d3d 100644 --- a/src/transports/WebSocketTransport.ts +++ b/src/transports/WebSocketTransport.ts @@ -33,7 +33,7 @@ class WebSocketTransport extends Transport { if (err) { const jsonError = err instanceof JSONRPCError ? err - : new JSONRPCError(e.message, ERR_UNKNOWN, err); + : new JSONRPCError(err.message, ERR_UNKNOWN, err); this.transportRequestManager.settlePendingRequest(notifications, jsonError); this.transportRequestManager.settlePendingRequest(getBatchRequests(data), jsonError); prom = Promise.reject(jsonError);