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 2b20ca9 commit e291f72Copy full SHA for e291f72
src/client/streamableHttp.ts
@@ -555,9 +555,11 @@ export class StreamableHTTPClientTransport implements Transport {
555
this._hasCompletedAuthFlow = false;
556
this._lastUpscopingHeader = undefined;
557
558
- // If the response is 202 Accepted, there's no body to process
559
- if (response.status === 202) {
560
- await response.body?.cancel();
+ // If the response is 202 Accepted or 204 No Content, there's no body to process
+ if (response.status === 202 || response.status === 204) {
+ if (response.status === 202) {
561
+ await response.body?.cancel();
562
+ }
563
// if the accepted notification is initialized, we start the SSE stream
564
// if it's supported by the server
565
if (isInitializedNotification(message)) {
0 commit comments