File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -873,7 +873,7 @@ export class StreamableHTTPServerTransport implements Transport {
873873 let requestId = options ?. relatedRequestId ;
874874 if ( isJSONRPCResultResponse ( message ) || isJSONRPCErrorResponse ( message ) ) {
875875 // If the message is a response, use the request ID from the message
876- requestId = message . id ;
876+ requestId = message . id ?? undefined ;
877877 }
878878
879879 // Check if this message should be sent on the standalone SSE stream (no request ID)
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ export interface JSONRPCResultResponse {
169169 */
170170export interface JSONRPCErrorResponse {
171171 jsonrpc : typeof JSONRPC_VERSION ;
172- id ? : RequestId ;
172+ id : RequestId | null ;
173173 error : Error ;
174174}
175175
Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ export enum ErrorCode {
198198export const JSONRPCErrorResponseSchema = z
199199 . object ( {
200200 jsonrpc : z . literal ( JSONRPC_VERSION ) ,
201- id : RequestIdSchema . optional ( ) ,
201+ id : RequestIdSchema . nullable ( ) ,
202202 error : z . object ( {
203203 /**
204204 * The error type that occurred.
You can’t perform that action at this time.
0 commit comments