We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa21043 commit 63b09a3Copy full SHA for 63b09a3
src/utils/json-rpc.ts
@@ -256,7 +256,9 @@ export function defineJsonRpcHandler<RequestT extends EventHandlerRequest = Even
256
}
257
258
// For notifications, the server MUST NOT reply (§4.1).
259
- return notification ? undefined : { jsonrpc: "2.0" as const, id: id!, result };
+ return notification
260
+ ? undefined
261
+ : { jsonrpc: "2.0" as const, id: id!, result: result ?? null };
262
} catch (error_: any) {
263
// For notifications, errors are silently discarded (§4.1).
264
if (notification) {
0 commit comments