Skip to content

Commit 67ad0bd

Browse files
authored
Ensure JSONRPCError messages are sent for streamable http
Prior to this, any JSONRPCError message sent when `enableJsonResponse` is true would be ignored (and response.end() never called)
1 parent 1317767 commit 67ad0bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/server/streamableHttp.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ export class StreamableHTTPServerTransport implements Transport {
587587
}
588588
}
589589

590-
if (isJSONRPCResponse(message)) {
590+
if (isJSONRPCResponse(message) || isJSONRPCError(message)) {
591591
this._requestResponseMap.set(requestId, message);
592592
const relatedIds = Array.from(this._requestToStreamMapping.entries())
593593
.filter(([_, streamId]) => this._streamMapping.get(streamId) === response)

0 commit comments

Comments
 (0)