Merge pull request #409 from mhart/patch-1

Ensure JSONRPCError messages are sent for streamable http
This commit is contained in:
ihrpr 2025-04-28 18:26:57 +01:00 • committed by GitHub
commit 465ba67194
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -587,7 +587,7 @@ export class StreamableHTTPServerTransport implements Transport {
}
}
if (isJSONRPCResponse(message)) {
if (isJSONRPCResponse(message) || isJSONRPCError(message)) {
this._requestResponseMap.set(requestId, message);
const relatedIds = Array.from(this._requestToStreamMapping.entries())
.filter(([_, streamId]) => this._streamMapping.get(streamId) === response)