We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2cc3bc8 commit 35396f4Copy full SHA for 35396f4
src/shared/protocol.ts
@@ -418,14 +418,18 @@ export abstract class Protocol<
418
this._responseHandlers.delete(messageId);
419
this._progressHandlers.delete(messageId);
420
421
- this._transport?.send({
422
- jsonrpc: "2.0",
423
- method: "cancelled",
424
- params: {
425
- requestId: messageId,
426
- reason: String(reason),
427
- },
428
- });
+ this._transport
+ ?.send({
+ jsonrpc: "2.0",
+ method: "cancelled",
+ params: {
+ requestId: messageId,
+ reason: String(reason),
+ },
429
+ })
430
+ .catch((error) =>
431
+ this._onerror(new Error(`Failed to send cancellation: ${error}`)),
432
+ );
433
434
reject(reason);
435
};
0 commit comments